views:

50

answers:

2

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

A: 

grep "$(echo $(($(echo $i | cut -d'|' -f2))))"

this is working

Joice
A: 

Why not use variables like they were meant to be used, i.e instead of

Value="abc efg hgd"

Say:

Value="$abc $efg $hgd"
pra