Simple thing really, I have this script that I've written where I can have a different number of options input.
I need to find what the last argument input to this script by the user and then save its value into a script variable.
This is what I have and it manages to get the value and then output it onto stdout.
Any way to twist this around so it saves into a variable in my script?
Many thanks.
I need to find what the last argument input to this script by the user and then save its value into a script variable.
This is what I have and it manages to get the value and then output it onto stdout.
Code:
eval echo \$$#
Any way to twist this around so it saves into a variable in my script?
Many thanks.