Pages

Thursday, March 29, 2012

shell script: to execute a string in variable as shell command

temp="ip=1.1.1.$p"
i wanted to extract ip address into a variable

solution:

eval ${temp}
myVar=$ip

No comments:

Post a Comment