Tag Archives: Shell

Shell One Liners

Renaming file name.old to name.new – To test things first, insert ‘echo’ between ‘do mv’ (below).

$ for i in *.input; do mv $i ${i/name\.old/name\.new}; done

Running application in loops on many input files

$ for i in *.input; do ./application $i; done

Posted in One Liners | Tagged , , , , , | Leave a reply