I have a script (myscript.sh) loop that greps some strings in many different files, stores them in a new file, and then cats the content of this file to the terminal:
for i in {1..201..5}; do
grep "Pitch" filename-$i.log | cut -d" " -f25
done > pitch.txt
echo "========Pitch==========="
cat pitch.txt
Here's what I'd like to do instead from the command line:
./myscript.sh filename-$i.log
This then runs myscript.sh, looping over the variable i that I refer to in the argument to myscript.sh.
I hope I have explained my goal here properly!