Quote Originally Posted by Paul Webster View Post
The "set" was just to show you how to see the environment variables and filter them to pick one.
You could then use it like this ...
tc@PiTouch:~$ ./test.sh $BOOTDEV
Booted from /dev/mmcblk0p1
tc@PiTouch:~$ cat test.sh
echo "Booted from $1"
However, that might not work from a cron job ... so copying the pCP way of doing it is wise.
I must admit, I didn't think of passing the variable as $1 (still have some way to go before I'm proficient at this I think), but yeah, I'm not sure whether the environment variables available in a 'tc' terminal shell would also be available to a cron job run by root. And since my script works as is, I'm going to pass on the opportunity to check!