bash command to retrieve line number for a motif ?
Hi friends,
I wanted to retrieve the line number corresponding to a motif in my text.
I've searched for sed,grep and awk but can't see how to do.
grep "motif" file
gives the line with motif but how to have the line number of the file where "motif" is present ?
advance thanks,
Last edited by rajinth; 05-06-2015 at 04:41 AM.
|