bash - Shell script assign variable value to another new variable -
i need small correction below code. trying assign variable value variable, it's not working. please me.
below script.
#!/bin/sh choice=1 val1="test" if [ "$choice" == 1 ]; echo "insode" echo $choice purpose=$val1 echo "*" echo $purpose fi
please me, i'm new shell scripting. need display purpose
value test.
you assign value val1
:
val1="test"
but later assign $val1
purpose
:
purpose=$val1
you have fix case variable names match (fix lowercase l
uppercase l
).
Comments
Post a Comment