?
Solved

Advanced grep-ing

Posted on 2015-02-12
2
Medium Priority
?
104 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 1600 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 400 total points
ID: 40606783
grep -l
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

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…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Suggested Courses
Course of the Month9 days, 12 hours left to enroll

762 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