[ILUG] sed help needed (or whichever tool)
Niall O Broin
niall at magicgoeshere.com
Tue Jan 24 17:12:18 GMT 2012
On 24 Jan 2012, at 17:04, Bernhard Rohrer wrote:
> I need to rename all the files in a directory by adding a suffix to them. the filenames look something like: 1326659048.M664667P14231.office.domain.net,S=2287,W=2346:2,Sa
> any help appreciated. this exceeds my comand line skills.
All current Linux distros will have a rename command, though there are two variations floating around which are rather incompatible - man rename for your local variant.
The Debian variant uses a perl regex, so
rename 's/$/.suffix/' *
would add .suffix to the end of every file
More information about the ILUG