home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / yacl-012.zip / tools / stripcr < prev    next >
Text File  |  1994-10-02  |  274b  |  17 lines

  1. #! /bin/sh
  2. #
  3. # Script to remove carriage returns from files
  4. #
  5. # Invoke with:
  6. #
  7. #    stripcr f1 f2 f3 ...
  8. #
  9. # to remove carriage returns from the given files.
  10. #
  11. for f in $*; do
  12.     echo Processing $f
  13.     g=`basename $f`
  14.     tr -d '\015' < $f > /tmp/$g
  15.     mv /tmp/$g $f
  16. done
  17.