try something like....
/bin/ls -1 | gawk '{system("tr -d \"\\015\" < "$1" > "$1".tmp");system("mv "$1".tmp "$1);}'
Eric
On Fri, 12 Feb 1999, Tom Dailey wrote:
> Hello,
>
> Me and a few other coders code from win9x boxes and then
> upload the code into unix box to patch in. I wrote a small
> program to dos2unix the files then mv them to the correct
> name but I want it so it does not make a new file if one does
> not exist.
>
> Here's the basic idea:
>
> dos2unix act.comm.c > act.comm.ck
> mv act.comm.ck act.comm.c
> dos2unix ban.c > ban.ck
> mv ban.ck ban.c
> etc etc...
>
> Could someone tell me how to dos2unix an entire directory w/
> in one command line or how would I tell it to not to make a new
> file if one does not exist..?
>
> Thanks in advance,
>
> Tom
>
>
> +------------------------------------------------------------+
> | Ensure that you have read the CircleMUD Mailing List FAQ: |
> | http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
> +------------------------------------------------------------+
>
+------------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
| http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
+------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST