grep value inside a variable pointing to other variable
- by Joice
using : ksh
*abc = 1
efg = 2
hgd = 3 not known to me *
say if i have
Value="abc efg hgd"
abc efg hgd all contains some value which i dnt know.
Now I want to grep the value contained inside abc.
like
for i in $Value
do
grep "echo $(($((echo $i | cut -d'|' -f2))))"
done
this grep should look for the value inside abc efg hgd
grep 1
grep 2
grep 3