Can i get this value in this variable [Linux Bash]
my code
#!/bin/bash
COUNTER=1
"user$COUNTER"=text
echo "$user$COUNTER"
result : 1
i need result : text
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.
In general, working with dynamic variable names like you want will only make your life more difficult. Arrays are much easier to work with (even in bash with it’s picky syntax: