d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Help With Bash > Touch
Add Reply New Topic New Poll
Member
Posts: 1,640
Joined: Dec 14 2010
Gold: 0.50
Dec 2 2017 12:36pm
Hey guys,

I need to create 900 files with different 3 letter names.

Example: xyz.txt, where x, y and z are letters a to z.

Thank you very much!
Member
Posts: 2,629
Joined: Oct 1 2017
Gold: 0.00
Dec 24 2017 05:54pm
depending on kernel limitations (getconf ARG_MAX)

Code
touch {a..z}{a..z}{a..z}.txt


otherwise
Code
for FILE in {a..z}{a..z}{a..z}; do touch $FILE.txt; done


?

This post was edited by hming on Dec 24 2017 05:55pm
Member
Posts: 14,607
Joined: Feb 4 2010
Gold: 966.74
Warn: 20%
Dec 24 2017 09:33pm
Fgt
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll