July 2018
Beginner
264 pages
8h 9m
English
Let's start our activity as follows:
#!/bin/bash
EXIT_PLEASE=0INC=0until [ ${EXIT_PLEASE} != 0 ] # EXIT_PLEASE is set to 0, until will never be satisfieddo echo "Boo $INC" > /dev/null INC=$((INC + 1)) sleep 1doneexit 0
$ bash loop_and_print.sh &$ ps aux | grep loop_and_print.sh # Take note of the PID - write it down
$ ps aux | grep loop_and_print.sh # Take note of the PID - write it down
$ bash loop_and_print.sh & # note the PID againg$ disown
Read now
Unlock full access