/ Published in: Bash
Useful if you need to run the same command for lots and lots of different parameters
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
#!/bin/bash cwd=`pwd` cmd="$cwd/one_user.pl" params="$cwd/param_file.txt" for line in `cat $params` do ## for deployment uncomment the next line #echo `$cmd $line > logs/$line.txt 2>&1` ## for testing purposes, makes sure that you're getting what you expect echo $cmd $line done echo exit 0