This is a stupid question but I'll ask it anyway. I have a couple of
hundred
bmp files that I want to convert to Sun Raster format. I figure the best
thing
to do this is the convert utility (but I'm open to suggestions). I am
not a very
good shell programmer but as far as I can see the way to build the new
filename from the old would be using something like the line below:
echo $i | awk 'BEGIN {FS= "."; OFS="."}; {print $1,"jpg"}'
My first question is am I cracking a nut with a sledge-hammer here?
Secondly, if I try to use this in a foreach loop in tcsh it does it for
the first file
in the list and then terminates. Can anybody tell me why? I have a fair
idea
that its something to do with enclosing the awk replacing the shell
process
image with itself.
TIA,
John
--
==================================
John Mc Donald,
Dept. of Computer Science,
National University of Ireland,
Maynooth,
Co. Kildare,
Ireland.
Email : johnmcd at cs.may.ie
Phone : +353 -1 - 7084589
Fax : +353 -1 - 7083848
http://www.cs.may.ie/~johnmcd
==================================
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!