10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I am using Solaris 5.10 & ksh
Wanted to loop through a pattern file by reading it and passing it to the awk to match that value present in column 1 of rawdata.txt , if so print column 1 & 2 in to Avlblpatterns.txt. Using the following code but it seems some mistakes and it is running for... (2 Replies)
Discussion started by: ananan
2 Replies
2. Shell Programming and Scripting
Hi,
I have scenario like below and need to search for multiple patterns
Eg:
Test
Time Started= secs
Time Ended = secc
Green test
Test
Time Started= secs
Time Ended = secc
Green test
Output:
I need to display the text starting with Test and starting with Time... (2 Replies)
Discussion started by: weknowd
2 Replies
3. Shell Programming and Scripting
Hello.
grep v2.21
Debian 8
I wish to search for and output these patterns in order;
"From " "To: " "Subject: " "Message-Id: " "Date: " "To: "
grep works, but not in strict order...
$ grep -a -E "^From |^Subject:|^From: |^Message-Id: |^Date: |^To: " InboxResult;
From - Wed Feb 18... (10 Replies)
Discussion started by: DSommers
10 Replies
4. Shell Programming and Scripting
Hi All,
I am starting a service which will redirect its out put into 2 logs say A and B.
Now for succesful startup of the service i need to search pattern1 in log A and pattern2 in log B which are writen continuosly.
Now my requirement is to find the patterns in the increasing logs A and B... (19 Replies)
Discussion started by: Girish19
19 Replies
5. Shell Programming and Scripting
Hi,
I tried to search multiple pattern using awk
trans=1234
reason=LN MISMATCH
rec=`awk '/$trans/ && /'"$reason"'/' file`
whenevr i tried to run on command promt it is executing but when i tried to implment same logic in shell script,it is failing i.e $rec is empty
... (6 Replies)
Discussion started by: ns64110
6 Replies
6. 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
7. Shell Programming and Scripting
Dear all,
I need to search multiple patterns and then I need to print their respective next lines. For an example, in the below table, I will look for 3 different patterns :
1) # ATC_Codes:
2) # Generic_Name:
3) # Drug_Target_1_Gene_Name:
#BEGIN_DRUGCARD DB00001
# AHFS_Codes:... (3 Replies)
Discussion started by: AshwaniSharma09
3 Replies
8. Shell Programming and Scripting
Hi,
I have to write one script that has to search a list of numbers in certain zipped files.
For eg. one file file1.txt contains the numbers. File1.txt contains 5,00,000 numbers and I have to search each number in zipped files(The number of zipped files are around 1000 each file is 5 MB)
I have... (10 Replies)
Discussion started by: vsachan
10 Replies
9. Shell Programming and Scripting
Hi,
I have a text file as follows:
11:38:11.054 run1_rdseq avg_2-5 999988.0000 1024.0000
11:50:52.053 run3_rdrand 999988.0000 1135.0 128.0417
11:53:18.050 run4_wrrand avg_2-5 999988.0000 8180.5833
11:55:42.051 run4_wrrand avg_2-5 999988.0000 213.8333
11:55:06.053... (2 Replies)
Discussion started by: annazpereira
2 Replies
10. Shell Programming and Scripting
Good day, great gurus,
I'm new to Perl, and programming in general. I'm trying to retrieve a column of data from my text file which spans a non-specific number of lines. So I did a regexp that will pick out the columns. However,my pattern would vary. I tried using a foreach loop unsuccessfully.... (2 Replies)
Discussion started by: Sp3ck
2 Replies