Last active
October 28, 2017 06:42
-
-
Save weshouman/86619bddd92b80756dee to your computer and use it in GitHub Desktop.
make numbered folders with bash #bash #study
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# knowledge needed | |
# for looping check: http://www.cyberciti.biz/faq/bash-for-loop/ | |
# print format: http://linuxconfig.org/bash-printf-syntax-basics-with-examples | |
# operand pipelining: http://unix.stackexchange.com/questions/9597/giving-grep-output-to-rm | |
# uses this if formatting isn't important | |
# for V in {1..13}; do mkdir "my_num_folder_${V}"; done | |
# note $V_ is different from ${V}_ | |
for V in {1..13}; do printf "my_num_folder_%02i" $V | xargs mkdir ; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment