Sometimes we tend to forget that for loops work within the command line as well 🙂
Â
An example with du -h to retrieve the file size of each file within the current directory
for x in *; do du -h $x; done
Another example with unzip to unzip each *.zip file within the current directory
for x in *.zip; do unzip $x; done
Â
Â