Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to grep this??

Status
Not open for further replies.

dvknn

IS-IT--Management
Mar 11, 2003
94
0
0
US
Hi,

I have lines in my log files like this.

1,"0999"4000,"gg0002ba39"117,"AE"50,"US"24,"20040711"0,"621"4128,"000000"4131,"000000"68,
"USD"80-1,"US"99,""

I want to grep the '117,"AE"50,"US"' this part from the file.

How can I do that?
 
Something like this ?
fgrep '117,"AE"50,"US"' /path/to/logile
or I'm missing something ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
In the string

1,"0999"4000,"gg0002ba39"117,"AE"50,"US"24,"20040711"0,"621"4128,"000000"4131,"000000"68,
"USD"80-1,"US"99,""

I do not have any spaces..Does fgrep allow to grep from the full string??

So, could you please explain fgrep?
 
this is a bit confusing.
Pls post a sample input and a desired output.


vlad
+----------------------------+
| #include<disclaimer.h> |
+----------------------------+
 
First, feel free to play with the man command.
Next, I don't quite understand your question.
What do you want to do ?
Find the lines in the log file that contain the specified pattern ?
Do substrings manipulations ?
Can you please post some input values examples with corresponding expected result ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top