[SLE] OT bash shell script question
I don't have access to any off line docs today. I'm trying to write a simple bash shell script to apply dos2unix to each .html file in a directory. I've almost got it (I think) if I can figure out how to test a filename for a .html suffix. Can anyone enlighten me? TIA -- Kenneth R. Kellum -- San Jose State University A scientific random survey demonstrating the value of a university education: Linus Torvalds: Has a degree. Bill Gates: Does not. -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
Hi, On Mon, Jan 17, 2000 at 14:23 -0800, Kenneth Kellum wrote:
I don't have access to any off line docs today. I'm trying to write a simple bash shell script to apply dos2unix to each .html file in a directory. I've almost got it (I think) if I can figure out how to test a filename for a .html suffix.
for x in *.html; do dos2unix "$x"; done hould do it. Ciao, Stefan -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
On Tue, 18 Jan 2000, Stefan Troeger wrote: st> Hi, st> st> On Mon, Jan 17, 2000 at 14:23 -0800, Kenneth Kellum wrote: st> st> > I don't have access to any off line docs today. I'm trying to write a simple st> > bash shell script to apply dos2unix to each .html file in a directory. I've st> > almost got it (I think) if I can figure out how to test a filename for a .html st> > suffix. st> st> for x in *.html; do dos2unix "$x"; done st> Yeah, that's it :) st> should do it. st> st> Ciao, st> Stefan st> st> -- S.Toms - tomas@primenet.com - homepage is in the works SuSE Linux v6.2+ - Kernel 2.2.13 You have a tendency to feel you are superior to most computers. -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
On Mon, 17 Jan 2000, Kenneth Kellum wrote: kk> I don't have access to any off line docs today. I'm trying to write a simple kk> bash shell script to apply dos2unix to each .html file in a directory. I've kk> almost got it (I think) if I can figure out how to test a filename for a .html kk> suffix. kk> Not the way you probably want it, but this will work just fine find <path> -type f -name "*.htm*" -exec dos2unix {} \; theres a way to do it in a shell script, but at the moment I can't recall it. kk> Can anyone enlighten me? kk> kk> TIA kk> -- S.Toms - tomas@primenet.com - homepage is in the works SuSE Linux v6.2+ - Kernel 2.2.13 "If you have to hate, hate gently" -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
participants (3)
-
kkellum@pacbell.net
-
sttr@sttr.de
-
tomas@primenet.com