ls | gawk '{print "mv " $1 " " $1 ".jpeg"}' | sh

:)

--
David Zverina
Alt Key Pty. Ltd.
http://www.altkey.com
PO Box 3121, Parramatta, 2124, Australia

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
> Nick Croft
> Sent: Thursday, 12 October 2000 21:31
> To: [EMAIL PROTECTED]
> Subject: [SLUG] Script to fix filenames
>
>
> 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?
>
> I've got over 200 of these and there are more to come.
>
> Thanks
>
> Nick
>
>
>
> --
> SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
> More Info: http://slug.org.au/lists/listinfo/slug
>



--
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug

Reply via email to