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
6 Comments
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
Thanks for sharing. I read many of your blog posts, cool, your blog is very good.
Your point of view caught my eye and was very interesting. Thanks. I have a question for you. https://accounts.binance.bh/register/person?ref=IXBIAFVY
Kudos to you! I hadn’t thuhogt of that!