Grep Command Help
Posted: Mon Jan 16, 2012 11:48 am
Hi,
I need help in grabbing the value after comma from a comma separated file in linux.
Values in a file :
ABC,0
DEF,1
GHI,2
FJK,3
I need to grep value 0 if i pass ABC as a parameter to command.
i tried with grep 'ABC' filename | awk '{print $1}' but unsuccessful.
Could any one please help me.
Thanks in Advance.
I need help in grabbing the value after comma from a comma separated file in linux.
Values in a file :
ABC,0
DEF,1
GHI,2
FJK,3
I need to grep value 0 if i pass ABC as a parameter to command.
i tried with grep 'ABC' filename | awk '{print $1}' but unsuccessful.
Could any one please help me.
Thanks in Advance.