TIP: Click on subject to list as thread! ANSI
echo: locsysop
to: Paul Edwards
from: Bob Lawrence
date: 1996-10-27 09:55:36
subject: Special Requests

BL> grep -v "-- archived --" files.20 >temp.txt 

 PE> Actually, that's exactly what I put in first off. Then it
 PE> trashed my files.20, replacing it with "this is how to use
 PE> grep", because it treated the "--" as options to grep! So then
 PE> I put in "\-\-", which was fine, except it turned out that in
 PE> files.20, there was no "-- archived --" in it!!! All it has is
 PE> the raw files.bbs, which is FILENAME DESCRIPTION. 

  I have no idea what your files.20 format may be, but if it creates a
text file with length in that file, then it must be possible to find
the entry in the original format... whatever it is that causes
"archived" to appear in the output.

 PE> At that point I decided to go with a "DELETE THIS FILE"
 PE> description as the easiest option for me.

  But it's not going to get the result, is it? An *automatic* way to
remove aero-length files from both your disc and the FILES list.

  At least my solution would achieve that. Your loony program that
builds the FILES list inserts "archived" automatically, and my little
Pascal thingie automatically removes those lines from the list.

 BL> Of course, you will tell me it isn't really Pascal, but neither
 BL> is your fucking BAT file.

 PE> It's a CMD file, and it's executing OS/2 programs.

  A BAT by any other name would smell as sweet and fail to work on
other OS.

 PE> I don't want to run DOS programs in my BBS.

  I didn't write my Pascal utility for you anyway... I did it to show 
you how easy and quick it is to read\write a large text file and remove 
lines in Pascal. In C you have to do it character-by-character, identify
the key phrase, find the cr/lf and then backtrack and stuff around in
general.

 PE> Also, I want it to fix up the files.20. The solution I have,
 PE> although annoying, does actually cover both of those technical
 PE> requirements.

  No it doesn't. It only works if the file sent to erase is zero
length AND has the magic phrase. Give it ten minutes and no one here
will ever get that phrase correct. It's worse than annoying... it just
isn't going to work in practice.

 PE> If you were to write a C program to do that, it would cover
 PE> both technical requirements too. Actually, I can do the "DIR"
 PE> in my cmd file, so you only need to open two text files, and
 PE> either create a 3rd output file containing commands, or call
 PE> system().

  Your problem is that you'd end up with a files.20 with the names of
thousands of zero-length files that no longer exist. I also find it
strange that you'd write a BAT file rather than just do it in a simple
utility.

Regards,
Bob
 

___ Blue Wave/QWK v2.12
@EOT:

---
* Origin: Precision Nonsense, Sydney (3:711/934.12)
SEEN-BY: 711/934 712/610
@PATH: 711/934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.