make bash search a list of dirs
Hi.
I would like a bash script to quickly search certain directories for executable foo. Can the directories be in a list, like {$HOME/bin,/bin,/usr/bin}? If so, what's the correct syntax? This is what I have so far. Code:
if [ ! -f /usr/bin/foo ]; then Googling this i learned echo Total dirs: $(ls -F | grep /$ | wc -l) and a few other things, but no cigar. I'm not sure what a relevant search phrase would be. TIA. |
What about the following?
Code:
for dir in $HOME/bin /bin /usr/bin |
Quote:
|
All times are GMT -5. The time now is 12:38 AM. |