LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-11-2003, 10:55 PM   #1
Ripper951
LQ Newbie
 
Registered: Jan 2003
Posts: 7

Rep: Reputation: 0
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.
 
Old 01-12-2003, 05:53 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
find <thisdir> -type f | while read i; do unix2dos ${i}; done
 
Old 01-12-2003, 11:40 AM   #3
Ripper951
LQ Newbie
 
Registered: Jan 2003
Posts: 7

Original Poster
Rep: Reputation: 0
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.

Last edited by Ripper951; 01-12-2003 at 11:46 AM.
 
Old 01-12-2003, 11:42 AM   #4
macewan
Senior Member
 
Registered: Jan 2002
Distribution: Ubuntu, Debian
Posts: 1,055
Blog Entries: 1

Rep: Reputation: 45
your should be you're
 
Old 01-12-2003, 11:46 AM   #5
Ripper951
LQ Newbie
 
Registered: Jan 2003
Posts: 7

Original Poster
Rep: Reputation: 0
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!
 
Old 01-12-2003, 12:23 PM   #6
macewan
Senior Member
 
Registered: Jan 2002
Distribution: Ubuntu, Debian
Posts: 1,055
Blog Entries: 1

Rep: Reputation: 45


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
 
Old 01-12-2003, 01:00 PM   #7
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
does linux have a scandisk utility? spyghost Linux - Newbie 14 02-15-2006 05:16 PM
What non-existing program / utility would you like to see in linux? acidjuice Linux - Software 4 04-08-2005 06:00 AM
is there a linux utility.... linuxnube Linux - Software 4 01-22-2004 01:45 PM
simple linux utility that does this? squip Linux - Newbie 1 10-07-2003 03:49 PM
Make Utility and RT Linux twizzard Linux - Newbie 3 06-28-2002 08:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration