Parse contents of directory to bash command in a script
- by ECII
I have the directory ~/fooscripts/ and inside there are foo1.txt, foo2.txt, etc etc
I have a command that takes the file foo1.txt as input and does some calculation. The output location etc is handled internally in fooprog
fooprog -user-data=foo1.txt
I would like to automate the whole thing in a bash script so that the script will parse all txt files in ~/fooscripts/ sequentially. I am a newbie in bash. Could anyone give me a hint?