Solved

Advanced grep-ing

Posted on 2015-02-12
2
101 Views
Last Modified: 2015-02-12
when I put this
grep "SSERV" . -RI

Open in new window

I get this

./super_html_4.c:  /* Note: operations SSERV_OP_USER_*, SSERV_OP_GROUP_* are loaded using dlsym */
./super_html_4.c:    if (val <= 0 || val >= SSERV_OP_LAST) return S_ERR_INV_OPER;
./super_html_4.c:  for (int i = 1; i < SSERV_OP_LAST; ++i) {
./super_html_4.c:        || opcode <= 0 || opcode >= SSERV_OP_LAST)
./super_html_4.c:      if (redir_opcode <= 0 || redir_opcode >= SSERV_OP_LAST || !super_proto_op_names[redir_opcode]) {
./super_proto.c.2.back:  if (n >= SSERV_ERR_LAST) {
./super_proto.c.2.back:const unsigned char * const super_proto_op_names[SSERV_OP_LAST] =
./super_proto.c.2.back:  [SSERV_OP_VIEW_CNTS_DETAILS] = "VIEW_CNTS_DETAILS",
./super_proto.c.2.back:  [SSERV_OP_EDITED_CNTS_BACK] = "EDITED_CNTS_BACK",
./super_proto.c.2.back:  [SSERV_OP_EDITED_CNTS_CONTINUE] = "EDITED_CNTS_CONTINUE",
./super_proto.c.2.back:  [SSERV_OP_EDITED_CNTS_START_NEW] = "EDITED_CNTS_START_NEW",
./super_proto.c.2.back:  [SSERV_OP_LOCKED_CNTS_FORGET] = "LOCKED_CNTS_FORGET",
./super_proto.c.2.back:  [SSERV_OP_LOCKED_CNTS_CONTINUE] = "LOCKED_CNTS_CONTINUE",

But, there are a lot of redundant information, duplicate file name. I want to get only list of file names, and every entry in this list must be unique.
How to achieve this goal.
0
Comment
Question by:Nusrat Nuriyev
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 400 total points
ID: 40606782
grep -RIl "SSERV"  .

"l" (lowercase l as in "list") means: list only names of files with matching content
0
 
LVL 84

Assisted Solution

by:ozo
ozo earned 100 total points
ID: 40606783
grep -l
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
Over the years I've spent many an hour playing on hardened, DMZ'd servers, with only a sub-set of the usual GNU toy's to keep me company; frequently I've needed to save and send log or data extracts from these server back to my PC, or to others, and…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question