Solved

Advanced grep-ing

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Recently, an awarded photographer, Selina De Maeyer (http://www.selinademaeyer.com/), completed a photo shoot of a beautiful event (http://www.sintjacobantwerpen.be/verslag-en-fotoreportage-van-de-sacramentsprocessie-door-antwerpen#thumbnails) in An…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
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.

813 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now