Fundamentals15 / 17
Up next

Special variables

#!/usr/bin/env bash
# $0 is the script name, $$ is the current process id
echo "script=$0"
echo "pid=$$"
# $RANDOM yields a new pseudo-random 0..32767 each read
echo "random in range: $((RANDOM % 6 + 1))"
What you're solving

$0, $$, and $RANDOM are built in