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
Post a Comment