grep value inside a variable pointing to other variable

Posted by Joice on Stack Overflow See other posts from Stack Overflow or by Joice
Published on 2010-06-09T16:32:07Z Indexed on 2010/06/09 17:02 UTC
Read the original article Hit count: 155

Filed under:
|
|

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

© Stack Overflow or respective owner

Related posts about unix

Related posts about scripting