home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume8 / explode / unexplode < prev   
Encoding:
Text File  |  1989-09-23  |  341 b   |  22 lines

  1. #!/bin/sh
  2. #
  3. # unexplode -- delete the files cerated by explode.
  4. #
  5. if [ $# -lt 1 ] ; then
  6.     echo "unexplode -- delete files created by explode."
  7.     echo "Usage: unexplode file"
  8.     exit 1
  9. fi
  10. for i in $*; do
  11.     if [ -f $i ] ; then
  12.         :
  13.     else 
  14.         if [ -f $i.tex ] ; then
  15.             i=$i.tex
  16.         fi
  17.     fi
  18.     rm -f `grep '\\file{' $i | sed '
  19.         s/.file{//
  20.         s/}//'`
  21. done
  22.