I have problem with getting value of parameter when I have variable with some value. What I mean is:
Example:
./script 12 13 14 15 16
value=5
echo $value #now I see 5
$"$value" #now I want to get 16 but I don't know how to do it?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use indirection:
Quotes aren’t necessary for the value 16, but should be used in case the variable contains special characters.