home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / s / sed15.zip / HISTORY.ZIP / SED11.BUG < prev    next >
Internet Message Format  |  1991-07-15  |  5KB

  1. Return-Path: <j.hollow@trl.OZ.AU>
  2. Received: from janus.trl.OZ.AU by shiva.trl.OZ.AU (5.64+1.3.1+0.50/TRL)
  3.     id AA18037; Wed, 10 Jul 1991 22:55:52 +1000
  4. Message-Id: <9107101255.AA18037@shiva.trl.OZ.AU>
  5. Date: Wed, 10 Jul 91 22:53 EST
  6. From: John Hollow <j.hollow@trl.OZ.AU>
  7. Subject: Your recent SED on SIMTEL MSDOS
  8. To: kirsch@usasoc.soc.mil
  9. X-Vms-To: IN%"kirsch@usasoc.soc.mil",HOLLOW
  10.  
  11. Summary:
  12. --------
  13. Regarding your recent release of SED , I find that it does not seem to support 
  14. the negation ! of a command.  
  15.  
  16. The following command should remove all lines ending in 002, but retain all 
  17. other lines.  It does this under Unix, but your SED does not remove the 002
  18. lines.
  19.         > sed     -n "/002$/!p"  infile.dat 
  20.  
  21. I found the GNU version ok with the above, but as you find it has other flaws, 
  22. I would be interested if an improved version of your SED fixed this problem.
  23.  
  24.  
  25. Details
  26. -------
  27.  
  28. I tested 4 versions of SED, 1 from Unix, 3 from SIMTEL MSDOS, namely:
  29.  
  30.    a.  Unix 4.3 BSD (DEC Ultrix)
  31.    
  32.    b.  Your SED namely:
  33.         PD1:<MSDOS.TXTUTL>SED11.ZIP          
  34.         MSDOS port of Unix streaming editor v1.1       B   35440  910619
  35.        I renamed SED.EXE to SED11.EXE
  36.    
  37.    c.  GNU SED namely:
  38.         PD1:<MSDOS.GNUISH>SED106.ARC         
  39.         Filters files according to rules               B   59195  901004
  40.        I renamed SED.EXE to SED106.EXE
  41.         
  42.    d.  An earlier SED, namely:
  43.         PD1:<MSDOS.TXTUTL>SED.ARC            
  44.         Unix Stream EDitor for DOS, w/source           B   46001  880428
  45.         
  46. My input file, was:
  47. --------------Start  infile.dat--------------------
  48. \SIMTEL\MSDOS\C\ASYNLIB2.UUE
  49. \SIMTEL\MSDOS\C\BITUUDEC.UUE
  50. \SIMTEL\MSDOS\C\CBASE101.001
  51. \SIMTEL\MSDOS\C\CBASE101.002
  52. \SIMTEL\MSDOS\C\CCC1053A.UUE
  53. \SIMTEL\MSDOS\C\CCC1053B.UUE
  54. \SIMTEL\MSDOS\C\CCC1053C.001
  55. \SIMTEL\MSDOS\C\CCC1053C.002
  56. \SIMTEL\MSDOS\C\CLP_V11.UUE
  57. --------------Finish infile.dat--------------------
  58.  
  59. I wanted a method of removing any line ending in 002 .  I tried 2 methods,
  60. COMMAND1.BAT and COMMAND2.BAT which used SCRIPT.SED under MSDOS:
  61.  
  62.  
  63. --------------Start  command1.bat-------------------
  64. sed     -n "/002$/!p"  infile.dat >out1.
  65. sed106  -n "/002$/!p"  infile.dat >out1.106
  66. sed11   -n "/002$/!p"  infile.dat >out1.11
  67. --------------Finish command1.bat-------------------
  68.  
  69.  
  70. --------------Start  command2.bat-------------------
  71. sed     -n -f script.sed  infile.dat  >out2.
  72. sed106  -n -f script.sed  infile.dat  >out2.106
  73. sed11   -n -f script.sed  infile.dat  >out2.11
  74. --------------Finish command2.bat-------------------
  75.  
  76.  
  77. --------------Start  script.sed  -------------------
  78. /002$/!p
  79. --------------Finish script.sed  -------------------
  80.  
  81.  
  82. My tests on Unix were performed with the above  script.sed  and the 1st lines 
  83. only of command1.bat and command2.bat .
  84.  
  85.  
  86. I got 3 different results:
  87.  
  88. --------------Start    Correct Result--------------------------
  89. \SIMTEL\MSDOS\C\ASYNLIB2.UUE
  90. \SIMTEL\MSDOS\C\BITUUDEC.UUE
  91. \SIMTEL\MSDOS\C\CBASE101.001
  92. \SIMTEL\MSDOS\C\CCC1053A.UUE
  93. \SIMTEL\MSDOS\C\CCC1053B.UUE
  94. \SIMTEL\MSDOS\C\CCC1053C.001
  95. \SIMTEL\MSDOS\C\CLP_V11.UUE
  96. --------------Finish   Correct Result--------------------------
  97.  
  98.  
  99. --------------Start  Incorrect Result--------------------------
  100. \SIMTEL\MSDOS\C\ASYNLIB2.UUE
  101. \SIMTEL\MSDOS\C\BITUUDEC.UUE
  102. \SIMTEL\MSDOS\C\CBASE101.001
  103. \SIMTEL\MSDOS\C\CBASE101.002
  104. \SIMTEL\MSDOS\C\CCC1053A.UUE
  105. \SIMTEL\MSDOS\C\CCC1053B.UUE
  106. \SIMTEL\MSDOS\C\CCC1053C.001
  107. \SIMTEL\MSDOS\C\CCC1053C.002
  108. \SIMTEL\MSDOS\C\CLP_V11.UUE
  109. --------------Finish Incorrect Result--------------------------
  110.  
  111.  
  112. --------------Start    Errored Result--------------------------
  113. sed: no such command as "/.002/!p"
  114. --------------Finish   Errored Result--------------------------
  115.  
  116.  
  117. The results were produced as follows:
  118.                                           COMMAND1.BAT    COMMAND2.BAT
  119.  
  120.         Unix 4.3 BSD (DEC Ultrix)         Correct         Correct
  121.         
  122.         PD1:<MSDOS.TXTUTL>SED11.ZIP       Incorrect       Incorrect   
  123.         
  124.         PD1:<MSDOS.GNUISH>SED106.ARC      Correct         Correct
  125.         
  126.         PD1:<MSDOS.TXTUTL>SED.ARC         Errored         Incorrect   
  127.  
  128. -------------------------------------------------------------------------------
  129. John Hollow,  Telecom Australia Research Laboratories, PO Box 249,           
  130.               Clayton, Australia  3168                                        
  131. INTERNET: j.hollow@trl.oz.au               VOICE : +613 541-6400  (03)541-6400
  132. VAX PSI : psi%050523542100201::j.hollow    FAX   : +613 543-4127  (03)543-4127
  133. -------------------------------------------------------------------------------
  134.