Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # set variables
- proc_id=$0
- proc_state=$1
- if [ $(pidof -s flite) ]; then
- echo $proc_state > /dev/tty
- proc_id=$(pidof -s flite)
- if [ "$proc_state" == "reading" ]; then
- kill $proc_id -stop
- proc_state="pause"
- echo $proc_state > /dev/tty
- fi
- if [ "$proc_state" == "pause" ]; then
- kill $proc_id -cont
- proc_state="ready"
- fi
- else
- proc_state="reading"
- xsel | flite -voice slt
- echo "shit" > /dev/tty
- echo "your in deep shit $proc_id and the proc state is $proc_state" #if process does not exist
- fi
Add Comment
Please, Sign In to add comment