Software >> OS >> Unix >> Shell >> bash >> How to run a script multiple times with script argument read from a file

 

 
## e.g. /var/tmp/titles.txt contain mutiple lines of multi-word strings
## to process each line as a single argument i.e. for the script

while read -r line;do echo ./yourscript.sh "$line";done < /var/tmp/titles.txt