I have a simple bash script to print the first argument provided to it
#!/bin/bash
echo $1
When I run this script as ./filename.sh $PATH
it prints out all the content in the variable PATH. I just want it to display the "$PATH" string.
I have tried echo "$1"
but it too behaves the same way.
Is there a workaround for this?
./filename.sh '$PATH'
– L. Scott Johnson Feb 19 '22 at 12:43