View Single Post
Posts: 75 | Thanked: 125 times | Joined on Nov 2008
#14
if you want to save that shell script to a file for easy running, type this from a terminal:
Code:
cat - > interval.sh
then press enter, then type
Code:
#!/bin/sh
as the first line, then paste the above script in entirity, then press enter for a new line and press CTRL+D to end the file.

Now make it executable:
Code:
chmod u+x interval.sh
and now whenever you want to run it, type:
Code:
./interval.sh
that line starts with a dot and assumes you did all of the above in your home directory, which is the default working directory when you open a terminal.