Basic Bash Script help
I am banging my head on this one and I know it is right in front of my face, but I swear I can't find nor remember how to do this...
All I want to do is substitute lines of a text file into an existing command. Can someone please help me.... Example, File contains foo bar cat hat Execute commands.... rm -rf ~/tmp/$var/* over and over so I get the commands rm -rf ~/tmp/foo/* rm -rf ~/tmp/bar/* rm -rf ~/tmp/cat/* rm -rf ~/tmp/hat/* Thanks so much! Mike |
Something like this?
Code:
while read subdir; |
Code:
for var in foo bar cat hat |
Wow
Two answers... both equally good. Thanks so much! Mike
|
All times are GMT -5. The time now is 02:09 AM. |