I have the following code
let a=1
let b=a
echo $b
When i echo b, i want it to refer it’s value (which is ‘a’), and display the value of a( which is ‘1’)
Can this be achieved?
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.
First, I would argue you don’t really want to do this. But instead of convincing you, here’s how to do it:
note that you can’t use “let” for the second assignment since you want to access the right-hand-side as a string later.