On Wed 01 Dec 2004 at 19:38:42, Josh Coates said: > echo blah001.txt | tr -d 0 > > will produce blah1.txt
The danger here (I caught myself before suggesting this) is that this
command will strip all zeros from the filename. So 'file010.txt' will
become 'file1.txt', which is not what Ryan wants.
But let's just say he *did* want to strip all zeros from the file name.
Then:
for f in blah*; do mv $f ${f//0/}; done
would be the most efficient way to do that.
--
Soren Harward <[EMAIL PROTECTED]> -- http://theboard.byu.edu/
"Americans are always attempting to run away from conformity, but
unfortunately they always start running in the same direction."
-- Art Buchwald
signature.asc
Description: Digital signature
-------------------- BYU Unix Users Group http://uug.byu.edu/ The opinions expressed in this message are the responsibility of their author. They are not endorsed by BYU, the BYU CS Department or BYU-UUG. ___________________________________________________________________ List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list
