I've got a shell script and I want to use the last argument:
#!/bin/bash
echo My last param is #somehow put it here
Here is what I've tried:
echo $$#
echo ${$#}
echo ${(($#))}
Unfortunately it did not work.
I'm specifically want to understand why my options did not work, I want to do something like double expansion.
In a broader sense, I would like to know how to access the Nth argument from the end. How do I achieve that?