10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
In the awk below, what I am attempting to do is check each line in the tab-delimeted input, which has ~20 lines in it, for a keyword
SVTYPE=Fusion. If the keyword is found I am splitting $3 using the . (dot) and reading the portion before and after the dot in an array a.
If it does have that... (12 Replies)
Discussion started by: cmccabe
12 Replies
2. UNIX for Dummies Questions & Answers
I am looking to move matching lines (01 - 07) from File1 and 77 tab the matching string from File2, to File3.txt. I am almost done but
- Currently, script is not printing lines to File3.txt in order.
Thanks a lot.
Any help is appreciated.
Script I am using:
awk 'FNR == NR && ! /^]*$/ {... (9 Replies)
Discussion started by: High-T
9 Replies
3. Shell Programming and Scripting
Data:
Pattern Data Data Data
Data Data Data
Data Data Data
...
With awk, how do I print the pattern matching line, then the subsequent lines following the pattern matching line. Varying number of lines following the pattern matching line. (9 Replies)
Discussion started by: dmesserly
9 Replies
4. Shell Programming and Scripting
Is there a way with aw to print all lines after a string is found
There is a file like this
.......
........
2012/19/11 :11.58 PM some data
lne no date
2012/19/11 :11.59 PM some other data
2012/20/11 :12.00 AM some other data
some line without dates
some more lines without dates... (8 Replies)
Discussion started by: swayam123
8 Replies
5. UNIX for Dummies Questions & Answers
I have a file like this
DoctorName
Address1
Address2
DOB
InsuredName
Address1
Address2
DOB
PatientName
Address1
Address2
DOB
ClaimNo1
DoctorName
Address1
Address2
DOB
InsuredName (2 Replies)
Discussion started by: nsuresh316
2 Replies
6. UNIX for Dummies Questions & Answers
I have a file with following data
A
B
C
D
E
F
G
H
I
K
L
M
N
and search pattern is G
Expected output (3 Replies)
Discussion started by: nsuresh316
3 Replies
7. UNIX for Dummies Questions & Answers
Hello, can someone help me how to find a word and 2 lines after it and then send the output to another file.
For example, here is myfile1.txt. I want to search for "Error" and 2 lines below it and send it to myfile2.txt
I tried with grep -A but it's not supported on my system.
I tried with awk,... (4 Replies)
Discussion started by: eurouno
4 Replies
8. UNIX for Dummies Questions & Answers
Ok so I can use awk to match a pattern and print the whole line with print $0. Is there any way to just tell awk to print every line of output when the pattern matches?
I'm having it wait for the word error and then print that entire line. But what I actually need to see is all the following... (9 Replies)
Discussion started by: MrEddy
9 Replies
9. Shell Programming and Scripting
Hi folks,
I have a text file that I need to parse, and I cant figure it out. The source is a report breaking down softwares from various companies with some basic info about them (see source snippet below). Ultimately what I want is an excel sheet with only Adobe and Microsoft software name and... (5 Replies)
Discussion started by: rowie718
5 Replies
10. UNIX for Dummies Questions & Answers
Hello,
How do I use grep to find a pattern in a list of file and then display 5 lines after the pattern is matched
Eg:
I want to match the string GetPresentCode in all files in a folder and then see 4 lines following this match. I am not sure if grep is what should be used to achieve. Thanks!... (3 Replies)
Discussion started by: cv_pan
3 Replies