I have to write a script, which will take all arguments and print them in reverse.
I\'ve made a solution, but find it very bad. Do you have a smarter idea?
Could do this
for (( i=$#;i>0;i-- ));do echo "${!i}" done
This uses the below c style for loop Parameter indirect expansion (${!i}towards the bottom of the page)
${!i}
And $# which is the number of arguments to the script
$#