Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

eval assignment

RUN_COST="Y"
RUN_SELLING="N"
RUN_RATIO="Z"

for prm in RUN_COST RUN_SELLING RUN_RATIO
do
     echo $prm
     eval VAR=$$prm
     echo  "$VAR"
done

Ouyput:
RUN_COST
Y
RUN_SELLING
N
RUN_RATIO
Z
Source by www.unix.com #
 
PREVIOUS NEXT
Tagged: #eval #assignment
ADD COMMENT
Topic
Name
8+8 =