Solved

Advanced grep-ing

Posted on 2015-02-12
2
97 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

Independent Software Vendors: 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

Suggested Solutions

Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
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 …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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.:

730 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