On 23:39 11 Feb 2002, Reuben D Budiardja <[EMAIL PROTECTED]> wrote: | I need a bit of help with bash here. I try to create a script that would | change the extension of files in directory. I have files like | xxx.pc that I want a change to xxx.jpg, where xxx is numbers, in a directory. | How can I do that using bash?
for f in *.pc do newname=`basename "$f" .bc`.jpg mv -i "$f" "$newname" done Of course that works in any Bourne shell, not just bash. Which is as it should be. -- Cameron Simpson, DoD#743 [EMAIL PROTECTED] http://www.zip.com.au/~cs/ It is not true that life is one damn thing after another -- it's one damn thing over and over. - Edna St. Vincent Millay _______________________________________________ Redhat-list mailing list [EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list