TIP: Click on subject to list as thread! ANSI
echo: 4dos
to: JORJ STRUMOLO
from: GERALD MILLER
date: 1998-04-16 09:54:00
subject: parsing

Hello Jorj,
 \|/  Subject:  parsing
 /|\  On Tuesday April 14 1998 at 13:59, 
      you wrote to Gerald Miller saying:
 GM>> saving a little description because I dislike repetitive typing.
 JS>  That's why we use aliases and batch files.  Since this is
 JS>  already a batch file, it's easy to deal with it there, by doing
 JS>  a global redescription.  Just stick a "describe" command after
 JS>  the part where you run TB.
Done.
 GM>> This could be because of my alias for one of the DIR
 >> commands -- uses some switches and a pipe command...
 JS>  Do you have Tmp and Temp and Temp4Dos set?  Those should do the
 JS>  pipe files in that dir, usually a ramdrive.  Otherwise it does
 JS>  get done in the current dir, which would mean there's a file
 JS>  deletion that would affect the descriptions.
I have a line in my AUTOEXEC.BAT that points to my ramdrive:
    FOR %%a in (TMP TEMP) do set %%a=G:\QWOK
I will modify it to include TEMP4DOS...  I was under the impression that this 
could be set via 4DOS.INI.  I'll remove it from the INI file.
 GM>> Yes.  It's just too much bother to "customize"
 >> the description for every directory.  
 JS>  Not really.  Use variables.  To get "d:\msg\qwk's virus file"
 JS>  or a variant, use        describe %trash "%_cwd's virus file"
 JS>  in the batch file.
Very nice.  I like it.  Consider it to be appended to my batch file and due 
credit given...  ;-))
 GM>> I haven't tried the above command because I'm not sure
 >> how it could be used.  Perhaps a small BTM example...
 JS>  It's just parsing output.  If I do:
 JS>      ffind /a:h /v /t"puppet" descript.ion > k:\!
 JS>  I get a five-line file:         0:
 JS>                                  1: ---- f:\win\descript.ion
 JS>  I can then parse that           2: puppet_6.bmp Pierson's Puppeteer
 JS>  file however I want to          3:
 JS>  get individual pieces           4:   1 line in      1 file
 JS>  from it.  Easily if it's
 JS>  a standard format always returned by a command, more difficultly
 JS>  if I have to search the whole thing for the piece I want.  This
 JS>  one is easy:
 JS>                  %@word[-1,[%@line[k:\!,%@lines[k:\!]]]
 JS>                     |          |            |
 JS>      returns word from a line  |     number of lines in file
 JS>                                |
 JS>                          returns specified
 JS>                            line in file
 JS>  So %lines says "4 lines in file" (it counts from 0, like most 4DOS
 JS>  variables), and %@line uses that number to say "  1 line in      1
 JS> file" and %@word uses "-1" to get the second word counting from the
 JS> right to get the "1" in front of "file".  You parse these things from
 JS> the innermost brackets outward.
EXCELLENT description.  This, I can understand!  Thank you.  Have you ever 
considered writing the documentation for JP Software???   ;^}
              G'Day ... Gerald
--- GoldED/386 3.00.Beta2 UNREG
---------------
* Origin: 4DOS for one and 4DOS for all! (1:153/715.6)

SOURCE: echomail via exec-pc

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™.