Wednesday, October 17, 2007

RUNCMDS.sh

#!/bin/bash
## BASH Script to Run any System command #####
## Script should be initialized as ./script.sh arg1 arg2 arg3,....
## echo "Commands with spaces should be supplied as \`COMMAND OPTIONS\`."
## echo "For example "./runcdms.sh \`mkdir test\` \`chmod 777 test\`""


for i in `$*`
do
#sudo - u root $i ## You can sudo if you are not root
$i
done

No comments: