LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Help with a linux utility (https://www.linuxquestions.org/questions/linux-general-1/help-with-a-linux-utility-41152/)

Ripper951 01-11-2003 10:55 PM

Help with a linux utility
 
Anyone know how to make unix2dos convert all files in a folder recursively?

I have one directory that has may sub-dirs and then some sub-dirs below those. But I want to covert all files from the main dir down.

Any help would be greatly appreciated.

unSpawn 01-12-2003 05:53 AM

find <thisdir> -type f | while read i; do unix2dos ${i}; done

Ripper951 01-12-2003 11:40 AM

My god man you're a genius!!
 
How in the world did you ever come up with that!!

Works like a charm!

Thank you very much.

Now, one more question.


How can I run this from a shell script and it not hang in limbo.

unix2dos $1

I have a script that holds the path and file name in the variable $1 and I want to run unix2dos on that one file from with in the script, but when I use what I have above unix2dos never finishes it just sort hangs in limbo and never completes.

Thanks again for the other info.

macewan 01-12-2003 11:42 AM

your should be you're

Ripper951 01-12-2003 11:46 AM

Haha
 
Well thats real helpful.

What are you the spelling patrol.

Why even post something as stupid as that cause I misspelled a word.

Some people!

macewan 01-12-2003 12:23 PM

;)

just kidding around.

maybe it's my need for more coffee this morning or maybe being married to an editor of a magazine. maybe it's because my engrish usage is so horrible. who knows. but it was ment(sp) to be taken lightly. take it as you will, it is you're decision

acid_kewpie 01-12-2003 01:00 PM

Quote:

How in the world did you ever come up with that!!
well no disrespect to UnSpawn (he could wipe the floor with any day round these parts) but it's a pretty simple issue... if you think that's impressive just wait...


All times are GMT -5. The time now is 11:31 PM.