Looping through alphabets in Bash Looping through alphabets in Bash bash bash

Looping through alphabets in Bash


for x in {a..z}do    echo "$x"    mkdir -p path2/${x}    mv path1/${x}*.ext path2/${x}done


This should get you started:

for letter in {a..z} ; do  echo $letterdone


here's how to generate the Spanish alphabet using nested brace expansion

for l in {{a..n},ñ,{o..z}}; do echo $l ; done | nl1  a ...14  n15  ñ16  o...27  z

Or simply

echo -e {{a..n},ñ,{o..z}}"\n" | nl

If you want to generate the obsolete 29 characters Spanish alphabet

echo -e {{a..c},ch,{d..l},ll,{m,n},ñ,{o..z}}"\n" | nl

Similar could be done for French alphabet or German alphabet.