i have to grep a file which has contents like
/Source/value/valuefile/readme.txt DefaultVersion:=1.7
I have to grep this file with "/Source/value/valuefile/readme.txt" and cut the corresponding value "1.7" from the same line
i tried grep and cut but not working.
yongitz
2
in awk and if your file is in the same format as the given example then you could try this
awk -F"=" '/\/Source\/value\/valuefile\/readme.txt/ {print $2}' filename
or with grep and cut
grep "/Source/value/valuefile/readme.txt" filename|cut -d"=" -f2