home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2 / Openstep-4.2-Intel-User.iso / NextLibrary / PrivateFrameworks / Uucp.framework / Versions / A / Resources / contrib / uuxconv < prev    next >
Text File  |  1993-08-29  |  1KB  |  51 lines

  1. #!/bin/sh
  2. #
  3. # uuxconv
  4. #
  5. # After converting to Taylor from SVR4.03 UUCP, I still had a lot of
  6. # jobs queued up to go out.
  7. #
  8. # This script is a one-shot to mass-requeue a site's spool.
  9. #
  10. # It doesn't go and do your whole spool, nor even all grades.
  11. # you need to go into each grade directory for each site and 
  12. # execute this.
  13. #
  14. # i.e.:  You have a site named 'foo'
  15. # cd /var/spool/uucp/foo/Z
  16. # uuxconv foo
  17. # it does delete the 'D' & 'X' after requeing them, but doesn't remove
  18. # the 'C' files.
  19. #
  20. # I foolishly went and ran this script on all my queued jobs, without
  21. # adding the improvements to recursively go through the entire UUCP spool,
  22. # so now I'm out of files to test with.  I don't want to add the code
  23. # to do that since I can't test it, and this worked.
  24. #
  25. # I hereby give this (trivial :-)) program to the GNU Project/FSF
  26. # and Ian Taylor in it's entirety, so that it can be placed in
  27. # the contrib directory of taylor-uucp, and save others the pain
  28. # of rewriting it.
  29. #
  30. # Richard Nickle (rick@trystro.uucp, rnickle@gnu.ai.mit.edu)
  31. # May 27, 1993
  32. #
  33. if [ $# -eq 0 ]
  34. then
  35.     echo "Usage: $0 sitename"
  36.     exit 1
  37. fi
  38. exit 0
  39. site=$1
  40. tsite=`echo $site | cut -c1-5`
  41. find . -name "D.$tsite*" -print |
  42. while read file
  43. do
  44.     control=`egrep "^C" $file | cut -c3-`
  45.     input=`egrep "^I" $file | cut -c3-`
  46.     (uux - -r -z $site!$control < $input) && (rm $file $input)
  47.     echo "$site!$control < $input"
  48. done
  49. exit 0
  50.