10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Lets say I have a massive directory which is filled with other directories all filled with different c++ scripts and I want a listing of all the scripts that contain the string: "this string". Is there a way to use a grep search for that? I tried:
grep -lr "this string" *
but I do not... (3 Replies)
Discussion started by: Circuits
3 Replies
2. Shell Programming and Scripting
Hi,
I've written a script to search for an Oracle ORA- error on a log file, print that line and the .trc file associated with it as well as the dateline of when I assumed the error occured. In most it is the first dateline previous to the error.
Unfortunately, this is not a fool proof script.... (2 Replies)
Discussion started by: newbie_01
2 Replies
3. Shell Programming and Scripting
Hello,
I want to extract from a file like :
20120530025502914 | REQUEST | whatever
20120530025502968 | RESPONSE | whatever
20120530025502985 | RESPONSE | whatever
20120530025502996 | REQUEST | whatever
20120530025503013 | REQUEST | whatever
20120530025503045 | RESPONSE | whatever
I want... (14 Replies)
Discussion started by: black_fender
14 Replies
4. Shell Programming and Scripting
I have an input file
12.4 1.72849432773174e+01 -7.74784188610632e+01
12.5 9.59432114416327e-01 -7.87018212757537e+01
15.6 5.20139995965960e-01 -5.61612429666624e+01
29.3 3.76696387248366e+00 -7.42896194101892e+01
32.1 1.86899877018077e+01 -7.56508762501408e+01
35 6.98857157014640e+00... (2 Replies)
Discussion started by: chrisjorg
2 Replies
5. UNIX for Dummies Questions & Answers
Hi Everyone,
I am looking for the unix command by which I can view 5 lines after the last occurence of a string (including the last occurence)
Example : I have the following lines in a unix file. I have to look for the last occurence of the string "How are you" and then view the next 5... (5 Replies)
Discussion started by: kannanfile
5 Replies
6. UNIX for Dummies Questions & Answers
Hi Everyone,
I am looking for the unix command by which I can view 10 lines after the 1st occurence of a string (including the 1st occurence)
Example : I have the following lines in a unix file. I have to look for the 1st occurence of the string "How are you" and then view the next 10 lines... (3 Replies)
Discussion started by: kannanfile
3 Replies
7. Shell Programming and Scripting
hey guys,
I tried searching but most 'search and replace' questions are related to one liners.
Say I have a file to be replaced that has the following:
$ cat testing.txt
TESTING
AAA
BBB
CCC
DDD
EEE
FFF
GGG
HHH
ENDTESTING
This is the input file: (3 Replies)
Discussion started by: DeuceLee
3 Replies
8. Shell Programming and Scripting
Hi,
my xml files looks something like this
<Instance Name="New York">
<Description></Description>
<Instance Name="A">
<Description></Description>
<PropertyValue Key="false" Name="Building A" />
</Instance>
<Instance Name="B">
... (4 Replies)
Discussion started by: tententen
4 Replies
9. Shell Programming and Scripting
Hi folks
I am not allowed to install GNU grep on AIX.
Here my code excerpt:
grep_fatal () {
/usr/sfw/bin/gegrep -B4 -A2 "FATAL|QUEUE|SIGHUP"
}
Howto the same on AIX based machine?
from manual GNU grep
‘--after-context=num’
Print num lines of trailing context after... (4 Replies)
Discussion started by: slashdotweenie
4 Replies
10. Shell Programming and Scripting
hi,
if I grep a file, sometimes I want to see as an eg 2 lines above and below my grep results.
how can this be done
thanks (3 Replies)
Discussion started by: JamesByars
3 Replies