10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
im using the following code to search a log for entries on two different lines:
awk 'BEGIN{count=0} /'"${firstpattern}"'/,/'"${secondpattern}"'/ { print; if ($0 ~ /'"${thirdpattern}"'/){count++}; } END { print count }' data.txt
firstpattern="start error log"
secondpattern="i am logging the... (1 Reply)
Discussion started by: SkySmart
1 Replies
2. Shell Programming and Scripting
Hi,
I have a text file the contents are like this
now i want to search patterns Z , Z etc and count the occurrence of such patterns, after Z value can be any random digits, please help me it is urgent...
output like this
Z .............>5
Z ............>8 (9 Replies)
Discussion started by: sreejithalokkan
9 Replies
3. Shell Programming and Scripting
Hi,
I am trying to find a way to get sed/awk/grep to help me find a string in a log file that exists between two datestamps and then print the preceding datestamp up to the next datestamp.
Here is an example of my logfile:
+++ 2013/03/28 17:01:37.085 SIGNALING HIGH ACTIVE
Failure Response... (5 Replies)
Discussion started by: raytx
5 Replies
4. Shell Programming and Scripting
I am trying to search the pattern "ARS (11)" and after the LAST pattern, i am trying to open new line and enter text using sed.
My Existing Text file is Users.txtpaul, Paul Smith, Stevn Smiley, REQ000001, ARS (11)
sam, Sam Martin, Stevn Smiley, REQ000001, ARS (11)
mike, Mike Conway, Stevn... (8 Replies)
Discussion started by: evrurs
8 Replies
5. Shell Programming and Scripting
42 network read failed
sv1 sv23 sv4
sv11 sv23 sv5 sv 7
48 client hostname could not be found
sv21 sv78 sv19 sv22
sv111 sv203 sv5 sv 33
49 client did not start
sv1 sv21
54 timed out connecting to client
sv2 sv4 sv12
above is my file , I'd like to use a script to list all name... (5 Replies)
Discussion started by: Sara_84
5 Replies
6. UNIX for Dummies Questions & Answers
%%%%% (9 Replies)
Discussion started by: lucasvs
9 Replies
7. Shell Programming and Scripting
Hi all,
I have a file having data:
@HWUSI-EAS1727:19:6:1:3674:984:0:1#GTTAATA
NTTGGGTTTTCT
@HWUSI-EAS1727:19:6:1:3674:984:0:1#GTTA...
NTTGGGTTTTCT
@HWUSI-EAS1727:19:6:1:3674:984:0:1#.....CT
NTTGGGTTTTCT
I want to print everything starting from # till line ends.
can you please help me how... (5 Replies)
Discussion started by: pirates.genome
5 Replies
8. Shell Programming and Scripting
I have two lists in a file that look like
a b
b a
e f
c d
f e
d c
I would like a final list
a b
c d
e f
I've tried multiple grep and awk but can't get it to work (8 Replies)
Discussion started by: godzilla07
8 Replies
9. Shell Programming and Scripting
hello,
i have an input file of about 50,00,000 lines. few of its lines are as follows:
<CR:0023498789,TPO-14987084;BO=IC&SUB=ALLP
<CF:0023498789,CB=YES;BIL&NC=NO
<CF:0023498789,CW=NO;NS=NO
<GC:0023498789,CG=YES;TPO&NC=YES
<CR:0024659841,TPO-14484621;BO=NO&BA=OC&SUB=ALLH... (1 Reply)
Discussion started by: rochitsharma
1 Replies
10. Programming
Hi,
can anyone show me how to solve the following exercise in ANSI C?
Create 2 process (parent & child).
The parent have to create a file called file<pid>, where <pid> is the process ID of the child process.
For n times (where n is a constant previously defined) the child process and... (1 Reply)
Discussion started by: FastMagister
1 Replies