home *** CD-ROM | disk | FTP | other *** search
- Return-Path: <j.hollow@trl.OZ.AU>
- Received: from janus.trl.OZ.AU by shiva.trl.OZ.AU (5.64+1.3.1+0.50/TRL)
- id AA18037; Wed, 10 Jul 1991 22:55:52 +1000
- Message-Id: <9107101255.AA18037@shiva.trl.OZ.AU>
- Date: Wed, 10 Jul 91 22:53 EST
- From: John Hollow <j.hollow@trl.OZ.AU>
- Subject: Your recent SED on SIMTEL MSDOS
- To: kirsch@usasoc.soc.mil
- X-Vms-To: IN%"kirsch@usasoc.soc.mil",HOLLOW
-
- Summary:
- --------
- Regarding your recent release of SED , I find that it does not seem to support
- the negation ! of a command.
-
- The following command should remove all lines ending in 002, but retain all
- other lines. It does this under Unix, but your SED does not remove the 002
- lines.
- > sed -n "/002$/!p" infile.dat
-
- I found the GNU version ok with the above, but as you find it has other flaws,
- I would be interested if an improved version of your SED fixed this problem.
-
-
- Details
- -------
-
- I tested 4 versions of SED, 1 from Unix, 3 from SIMTEL MSDOS, namely:
-
- a. Unix 4.3 BSD (DEC Ultrix)
-
- b. Your SED namely:
- PD1:<MSDOS.TXTUTL>SED11.ZIP
- MSDOS port of Unix streaming editor v1.1 B 35440 910619
- I renamed SED.EXE to SED11.EXE
-
- c. GNU SED namely:
- PD1:<MSDOS.GNUISH>SED106.ARC
- Filters files according to rules B 59195 901004
- I renamed SED.EXE to SED106.EXE
-
- d. An earlier SED, namely:
- PD1:<MSDOS.TXTUTL>SED.ARC
- Unix Stream EDitor for DOS, w/source B 46001 880428
-
- My input file, was:
- --------------Start infile.dat--------------------
- \SIMTEL\MSDOS\C\ASYNLIB2.UUE
- \SIMTEL\MSDOS\C\BITUUDEC.UUE
- \SIMTEL\MSDOS\C\CBASE101.001
- \SIMTEL\MSDOS\C\CBASE101.002
- \SIMTEL\MSDOS\C\CCC1053A.UUE
- \SIMTEL\MSDOS\C\CCC1053B.UUE
- \SIMTEL\MSDOS\C\CCC1053C.001
- \SIMTEL\MSDOS\C\CCC1053C.002
- \SIMTEL\MSDOS\C\CLP_V11.UUE
- --------------Finish infile.dat--------------------
-
- I wanted a method of removing any line ending in 002 . I tried 2 methods,
- COMMAND1.BAT and COMMAND2.BAT which used SCRIPT.SED under MSDOS:
-
-
- --------------Start command1.bat-------------------
- sed -n "/002$/!p" infile.dat >out1.
- sed106 -n "/002$/!p" infile.dat >out1.106
- sed11 -n "/002$/!p" infile.dat >out1.11
- --------------Finish command1.bat-------------------
-
-
- --------------Start command2.bat-------------------
- sed -n -f script.sed infile.dat >out2.
- sed106 -n -f script.sed infile.dat >out2.106
- sed11 -n -f script.sed infile.dat >out2.11
- --------------Finish command2.bat-------------------
-
-
- --------------Start script.sed -------------------
- /002$/!p
- --------------Finish script.sed -------------------
-
-
- My tests on Unix were performed with the above script.sed and the 1st lines
- only of command1.bat and command2.bat .
-
-
- I got 3 different results:
-
- --------------Start Correct Result--------------------------
- \SIMTEL\MSDOS\C\ASYNLIB2.UUE
- \SIMTEL\MSDOS\C\BITUUDEC.UUE
- \SIMTEL\MSDOS\C\CBASE101.001
- \SIMTEL\MSDOS\C\CCC1053A.UUE
- \SIMTEL\MSDOS\C\CCC1053B.UUE
- \SIMTEL\MSDOS\C\CCC1053C.001
- \SIMTEL\MSDOS\C\CLP_V11.UUE
- --------------Finish Correct Result--------------------------
-
-
- --------------Start Incorrect Result--------------------------
- \SIMTEL\MSDOS\C\ASYNLIB2.UUE
- \SIMTEL\MSDOS\C\BITUUDEC.UUE
- \SIMTEL\MSDOS\C\CBASE101.001
- \SIMTEL\MSDOS\C\CBASE101.002
- \SIMTEL\MSDOS\C\CCC1053A.UUE
- \SIMTEL\MSDOS\C\CCC1053B.UUE
- \SIMTEL\MSDOS\C\CCC1053C.001
- \SIMTEL\MSDOS\C\CCC1053C.002
- \SIMTEL\MSDOS\C\CLP_V11.UUE
- --------------Finish Incorrect Result--------------------------
-
-
- --------------Start Errored Result--------------------------
- sed: no such command as "/.002/!p"
- --------------Finish Errored Result--------------------------
-
-
- The results were produced as follows:
- COMMAND1.BAT COMMAND2.BAT
-
- Unix 4.3 BSD (DEC Ultrix) Correct Correct
-
- PD1:<MSDOS.TXTUTL>SED11.ZIP Incorrect Incorrect
-
- PD1:<MSDOS.GNUISH>SED106.ARC Correct Correct
-
- PD1:<MSDOS.TXTUTL>SED.ARC Errored Incorrect
-
- -------------------------------------------------------------------------------
- John Hollow, Telecom Australia Research Laboratories, PO Box 249,
- Clayton, Australia 3168
- INTERNET: j.hollow@trl.oz.au VOICE : +613 541-6400 (03)541-6400
- VAX PSI : psi%050523542100201::j.hollow FAX : +613 543-4127 (03)543-4127
- -------------------------------------------------------------------------------