I'm attempting to write a function in bash that will access the scripts command line arguments, but they are replaced with the positional arguments to the function. Is there any way for the function to access the command line arguments …
I written the following script which gets name of a file and then assemble and link the file. But it doesn't work. What is the problem with it?
EXPECTED_ARGS=2
if [ $# -ne $EXPECTED_ARGS ]
then
echo "[+] Assembling with Nasm."
nasm …
I want to retrieve the n-th parameter of $@ (the list of command line parameters passed to the script), where n is stored in a variable.
I tried ${$n}.
For example, I want to get the 2nd command line parameter of …