I have a directory with a bunch of files with names like:
001234.jpg 001235.jpg 004729342.jpg
I want to remove the leading zeros from all file
Try using sed, e.g.:
sed
sed -e 's:^0*::'
Complete loop:
for f in `ls`; do mv $f $(echo $f | sed -e 's:^0*::') done