Creating multiple files with content from shell

echo Hello > a.txt
echo World > b.txt

for i in a b c d e f g; do
    echo $i > $i.txt
done

If you want more useful examples, ask a more useful question...


for i in {1..200}; do touch any_prefix_here${i}; done

where i is the count. So example files are employee1 employee2 etc... through to emplyee200


One command to create 26 empty files:

touch {a..z}.txt

or 152:

touch {{a..z},{A..Z},{0..99}}.txt

A small loop to create 152 files with some contents:

for f in {a..z} {A..Z} {0..99}
do
    echo hello > "$f.txt"
done

You can do numbered files with leading zeros:

for i in {0..100}
do
    echo hello > "File$(printf "%03d" "$i").txt"
done

or, in Bash 4:

for i in {000..100}
do
    echo hello > "File${i}.txt"
done