pbharris
02-22-2001, 07:00 PM
hi all,
i have a utility called 'dos2unix' which strips the newline char which gets sent in with dos type files. I have a bunch of directories full of these files. The file commands is called like this:
dos2unix input output
When using it one file at a time I have output be the same name as input, e.g.
dos2unix hullo.c hullo.c
I started this then quickly realized i had no idea of how to read a directory (or a file) into a shell script:
#! /bin/sh
if
somthing needs to go here
dos2unix $n $n
fi
i have a utility called 'dos2unix' which strips the newline char which gets sent in with dos type files. I have a bunch of directories full of these files. The file commands is called like this:
dos2unix input output
When using it one file at a time I have output be the same name as input, e.g.
dos2unix hullo.c hullo.c
I started this then quickly realized i had no idea of how to read a directory (or a file) into a shell script:
#! /bin/sh
if
somthing needs to go here
dos2unix $n $n
fi