- To: slug@xxxxxxxxxxx
- Subject: [SLUG] Re: Script to fix filenames
- From: Angus Lees <gusl@xxxxxxxxxxxxxxx>
- Date: Fri Oct 13 16:17:29 2000
- User-agent: Mutt/1.0.1i
\begin{Nick Croft}
> I keep getting batches of jpegs without the .jpeg extension (or any other
> permutation).
>
> What area of scripting should I look to in order to add the extension. Is
> sed able to work on filenames in a directory as it doeson words in a file?
for f in *; do
test -z "${f##*.*}" || mv $f $f.jpeg
done
or something..
--
- Gus