Problem scenario
You want to test the $# built-in Linux variable. Every time you use it, it seems to return “0.” How do you see the number of arguments in the most recent command?
Solution
Create a bash script with the following lines “echo… to fi”:
echo “This script helps you learn about built-in variables in Linux.”
if [ $# -eq 1 ]
…
Continue reading “How Do You Use the $# Builtin Linux Variable?”