Skip to content

Instantly share code, notes, and snippets.

@tldrafael
Last active September 15, 2022 10:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tldrafael/b351653722f6c414367bc9caaab19bed to your computer and use it in GitHub Desktop.
Save tldrafael/b351653722f6c414367bc9caaab19bed to your computer and use it in GitHub Desktop.
$ for f in `ls *`; do nc=${#f}; nc2=$((10-$nc)); if [ $nc2 -gt 0 ]; then preffix=`printf '0%.0s' $(seq 1 $nc2)`; newf=$preffix$f; mv $f $newf; fi; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment