[NTLUG:Discuss] A quick Bash scripting question
Johnie Stafford
jms at pobox.com
Tue May 7 19:55:06 CDT 2002
>>> On Tue, 7 May 2002 19:01:03 -0500, Courtney Grimland <cgrimland at yahoo.com> said:
cg> I'm very new to Unix shells so please be gentle.
cg> I have a directory full of *.xpm's, and I want to rename them all *_32x32.xpm with a q&d Bash script.
cg> Would anyone be so kind as to give me a hint? I can't seem to figure out which tools to string together to get this done.
for file in *.xpm
do
basefile=`basename $file .xpm`
mv $file ${basefile}_32x32.xpm
done
More information about the Discuss
mailing list