How to list Alphabetical Files and folders in Linux?
Some times it’s required to list only alphabetical file names when listing a directory. A small script will help you in getting this..
for i in *; do egrep '^[a-zA-Z]+$' <<<"$i"; done
Here we used reg-exp to grep only alphabets ie a-z and A-Z and nothing more than that.
As one of the blog user asked me the meaning of above command here is the explanation. You should know reg-exp to know about ^[a-zA-Z]+$ and <<< is called as hear string, this will pass word to the command, here the command is grep.