* Greg Olszewski <[EMAIL PROTECTED]> writes:
> =============cut=================
> #! /bin/bash
> LOOP_TIMES=$#
> LOOP=1
> FILE=$1
> TMPFILE=$(mktemp /tmp/tmp.XXXXX)
> if [ $? != 0 ] then
> echo "Couldn't get temp file" exit 1
> fi
> while [ $LOOP -le $LOOP_TIMES ]; do
> cat $FILE | tr "\r" "\n" > $TMPFILE
> mv $TMPFILE $FILE
> shift
> LOOP=$[ LOOP + 1 ]
> done
> ============end=================
Looks good, Greg, but it didn't work for me. I tested it by
substituting the cat lala and mv lala lines with a 'echo $FILE'...
Result. Only the first file in the directory was listed. But it was
listed the same number of times that there were files in the
directory. :-)
===========================
Want to really learn Linux?
... Install Slackware
===========================
--
|---<Regards, Steve Youngs>-------------------------------------|
| Genius is the ability to |
| reduce the complicated to the simple |
|------------------------------------<[EMAIL PROTECTED]>---|
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.linux-learn.org/faqs