On Sun, 08 May 2005 12:53:06 -0700

> > tr -d "\r" < input-file > output-file
> Or:
> perl -pi -e 's/\015//' *.c
> which will edit all .c files in place, or:
> perl -pi.bak -e's/\015//' *.c

(I forget to add a for or foreach line!)

If there is a large number of files (i.e. if the command is too
long - error: "Argument list too long")

try something like:

find -X . -type f -print | xargs -L 1  perl -pi.bak -e's/\015//'

Don't forget to do a backup copy of your original files!
If filenames should be protected (enclosed in "" or '' ) the -X find
option complains and skip them.


-- 
<regisr>  
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to