home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / misc / test / 14670 < prev    next >
Encoding:
Text File  |  1992-12-29  |  3.3 KB  |  118 lines

  1. Newsgroups: misc.test
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!spool.mu.edu!umn.edu!lynx!ozone!secret!hidden!Unknown.com!WhoKnows
  3. From: WhoKnows
  4. Subject: - test (1/1)
  5. Message-ID: <1992Dec29.155750.1@Unknown.com>
  6. Date: Tue, 29 Dec 92 22:57:54 GMT
  7. Organization: SSS (Society for Strong Secrecy)
  8. Originator: WhoKnows@Unknown.com
  9. Sender: WhoKnows@Unknown.com (Who knows what evil lurks in the hearts of men?)
  10. Nntp-Posting-Host: shadow.Unknown.com
  11. Keywords: anonymous post
  12. Approved: The Shadow
  13. Originator: ajbahm@triton.unm.edu
  14. Lines: 102
  15.  
  16.     test is a uuencoded 
  17.  
  18.     This description and the associated part contains the uuencoded form
  19.     of test.
  20.  
  21. #--------shell begin here-------
  22. #! /bin/sh
  23. # NOTE: THIS IS *NOT* A "shar" FILE!!
  24. #       ALL INFORMATION BETWEEN "cut here" PAIRS MAY BE EXTRACTED BY ANY
  25. #       MEANS YOU DESIRE, INCLUDING BY EXECUTING THIS SCRIPT.
  26. # test, part 1/1
  27. # Concatenate test*.uu files, pipe to uudecode to create 'test'.
  28. echo "Extracting test1.uu"
  29. if [ `echo $0 | sed -e 's?.*/??'` = "sh" ]
  30. then
  31.   echo "Using this script as shell standard input disables automatic"
  32.   echo "  truncation detection.  Truncation is likely if the next message"
  33.   echo "  isn't 'test1.uu extracted successfully!'..."
  34. else
  35.   fend=`grep "End of" $0 | sed -e '/^\ \ fend/d'`
  36.   if [ "$fend" = "" ]
  37.   then
  38.     echo "ERROR:  test part 1 is truncated!"
  39.     exit 1
  40.   fi
  41. fi
  42. sed -e '/^BEGIN/d' -e '/^END/d' << \EndOfUUSection > test1.uu
  43. BEGIN --- CUT HERE --- Cut Here --- cut here ---
  44. begin 600 test
  45. A"CQT87 ^(#QT87 ^("!)<R!T:&ES('1H:6YG(&]N/PH*
  46.  
  47. end
  48. END --- CUT HERE --- Cut Here --- cut here ---
  49. EndOfUUSection
  50. wcSize=`wc -lwc test1.uu | awk '{ printf "%s %s %s", $1, $2, $3 }'`
  51. if [ "$wcSize" = "4 7 67" ]
  52. then
  53.   echo "test1.uu extracted successfully!"
  54. else
  55.   echo "ERROR IN test1.uu EXTRACTION!"
  56.   echo "Expecting sum of '4 7 67', got ${wcSize}..."
  57.   exit 1
  58. fi
  59. if [ `echo test*.uu | wc -w` -eq 1 ]
  60. then
  61.   echo "All uuencoded parts of test extracted, uudecoding..."
  62.   cat test*.uu > test.UU
  63.   test -f test.UU
  64.   fileErr=$?
  65.   if [ $fileErr -eq 0 ]
  66.   then
  67.     wcSize=`wc -lwc test.UU | awk '{ printf "%s %s %s", $1, $2, $3 }'`
  68.     if [ "$wcSize" = "4 7 67" ]
  69.     then
  70.       cat test.UU | uudecode
  71.       extrErr=$?
  72.       if [ $extrErr -eq 0 ]
  73.       then
  74.         test -f test
  75.         fileErr=$?
  76.         if [ $fileErr -eq 0 ]
  77.         then
  78.           wcSize=`wc -lwc test | awk '{ printf "%s %s %s", $1, $2, $3 }'`
  79.           if [ "$wcSize" = "3 6 33" ]
  80.           then
  81.             echo "test extracted successfully!"
  82.             rm test*.uu test.UU
  83.             exit 7
  84.           else
  85.             echo "ERROR IN test filesum!"
  86.             echo "Expecting sum of '3 6 33', got ${wcSize}..."
  87.             exit 1
  88.           fi
  89.         else
  90.           echo "ERROR: File test doesn't exist!!"
  91.           exit 1
  92.         fi
  93.       else
  94.         echo "ERROR:  In extraction of test - examine test.UU..."
  95.         exit 1
  96.       fi
  97.     else
  98.       echo "ERROR IN test.UU filesum!"
  99.       echo "Expecting sum of '4 7 67', got ${wcSize}..."
  100.       exit 1
  101.     fi
  102.   else
  103.     echo "ERROR: File test.UU doesn't exist!!"
  104.     exit 1
  105.   fi
  106. fi
  107. exit 0
  108. #
  109. # End of 'test1.uu'
  110. #
  111. #--------shell end here-------
  112. ('wc -lwc test1' should be '4 7 67'...)
  113. ('wc -lwc test' should be '3 6 33'...)
  114.  
  115.     >>> Processed using xmitBin ver. 1.8 by D. Jim Howard <<<
  116.  
  117.  
  118.