- Open a terminal
- Clone and execute the script (single command):
git clone https://github.com/opacicmarko/say-what && ./say-what/say.shTo stop the script you need to kill the script process:
- List running processes
ps -A | grep say- Find the ID of the process in question
PID TTY TIME CMD
26115 ttys000 0:00.00 /bin/bash ./say-what/say.sh <-- THE say.sh process- Kill the process using the PID
kill 26115There are two arguments you can provide to the script:
- MESSAGE - the message that will be passed to
sayto be read out loud. - INITIAL_TIMEOUT - the time to
sleepbefore entering thesayloop.
The arguments are provided without any keywords:
./say.sh <MESSAGE> <INITIAL_TIMEOUT>Example:
./say.sh "ha ha" 10Note that because of the argument order, the timeout cannot be provided without a custom message. The default timeout is set to 60 seconds.
If the script is not executing, run this command before executing the script again:
chmod +x say-what/say.sh