Shell: grep the true value -


when use grep value, gave me 2 value. how can true value?

for example:

vmdk

cid=abcdefgh

parentcid=12345678

shell

cid=$(grep -i "cid"  "snapshot.vmdk" | cut -d'=' -f2) echo "cid = $cid" 

result:

cid = abcdefgh

12345678

add -w flag in grep command like:

grep -w -i ... 

Comments

Popular posts from this blog

hibernate - How to load global settings frequently used in application in Java -

python 3.x - Mapping specific letters onto a list of words -

objective c - Ownership modifiers with manual reference counting -