I am writing a shell script that takes in a time (in minutes) and opens an online egg timer set for that amount.
#!/bin/bash
#Opens http://e.ggtimer.com/TIMEmin where TIME = number of minutes
TIME=5
xdg-open http://e.ggtimer.com/"$TIME"min
When I run the above script it opens the web page http://e.ggtimer.com/5min I would like to set the time from the terminal. For example:
eggtimer 10
Would open http://e.ggtimer.com/10min
Thank you!
$1
soTIME=$1
or just put$1
in your URL. – Joseph R. May 02 '14 at 00:07${VAR:-defaultval}
post when I wrote it, just saw the commentary now. – slm May 02 '14 at 00:22