February 25, 2011
Bash Loop File or Directory by Name
This is a simple method how to list file or directory with bash programming :
#!/bin/sh DIR_LOC=/home/toto for i in $DIR_LOC/* do echo "Process file $i" done
If we want to filter ouput data (example : we want to filter list file with *.sh tipe data, so we can change code with :
#!/bin/sh DIR_LOC=/home/toto for i in $DIR_LOC/*.sh do echo "Process file $i" done
Great post, I admire the writing style 🙂 A little off topic here but what theme are you using? Looks pretty cool.
I will immediately take hold of your rss as I can’t find your email subscription link or e-newsletter service. Do you have any? Kindly permit me know so that I may subscribe. Thanks. Koha Ditore
Kudos to you! I hadn’t thuhogt of that!