Oct 7, 2003 #1 chomps303 MIS Sep 30, 2003 83 US How can I get sed to tell me what the line number is for a specific line? ie: file abc = aaaaaaaaaa bbbbbbbbbb cccccccccc search for bbbbb and return line 2 Thanks Brandt
How can I get sed to tell me what the line number is for a specific line? ie: file abc = aaaaaaaaaa bbbbbbbbbb cccccccccc search for bbbbb and return line 2 Thanks Brandt
Oct 7, 2003 #2 PHV MIS Nov 8, 2002 53,708 FR Try something like this: Code: awk '/bbbbb/{printf "%d\n",NR}' abc Hope This Help PH. Upvote 0 Downvote