10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I used to use this script to extract the same lines from two files:
grep -f file1 file2 > outputfile
now I have file1 AB029895
BU237045 (4 Replies)
Discussion started by: yuejian
2. Shell Programming and Scripting
I have a text and I want to extract the 4 lines following a keyword!
For example if I have this text and the keyword is AAA
I want the output to be
four (7 Replies)
Discussion started by: stekanius
3. Shell Programming and Scripting
I have an xml file with the below data:
Street = “station straat”
ZIPCODE="2516 CK "
Street = “Leeuwen straat”
ZIPCODE="2517 AB "
<Address City=”The Hauge”
Street = “kirk straat”
... (1 Reply)
Discussion started by: LinuxLearner
4. UNIX for Dummies Questions & Answers
I need to extract lines between the lines 'RD' and 'QA' from a text file (following). there are more that one of such pattern in the file and I need to extract all of them. however, the number of lines between them is varied in the file. Therefore, I can not just use 'grep -A' command.... (6 Replies)
Discussion started by: johnshembb
5. Shell Programming and Scripting
I have a situation wherein I need to extract two lines from below the search string.
$ grep "$(date +'%a %b %e')" alert.log
Mon Apr 12 03:58:10 2010
Mon Apr 12 12:51:48 2010
Here I would like the display to be something like
Mon Apr 12... (6 Replies)
Discussion started by: geetap
6. Shell Programming and Scripting
I have a text test1.txt file like:Receipt
End (9 Replies)
Discussion started by: TQ3
7. Shell Programming and Scripting
I have two files
file A which have a number in every row and file B which contains few hundred thousand rows with about 300 characters in each row (csv)
What I need is to extract whole rows from B file (only these which numbers are indicated in A file)
I also need to use cygwin.
Any... (7 Replies)
Discussion started by: gunio
8. Shell Programming and Scripting
I have three files.
The first file (FILE_INFO in my code) consists of four parameters for each line.
0.00765600 0.08450704 M3 E3
0.00441931 0.04878049 M4 E5
0.01904574 0.21022727 M5 E10
0.00510400 0.05633803 M6 E12
0.00905960 ... (11 Replies)
Discussion started by: my_Perl
9. Shell Programming and Scripting
I regularly extract lines of text from files based on the presence of a particular keyword; I place the extracted lines into another text file. This takes about 2 hours to complete using the "sort" command then Kate's find & highlight facility.
I've been reading the forum & googling and can find... (4 Replies)
Discussion started by: DionDeVille
10. Shell Programming and Scripting
I want to extract certain text between two line numbers like
How do I do this with a simple sed or awk command?
---------- Post updated at 06:16 PM ---------- Previous update was at 05:55 PM ----------
sed -n '#1,#2p'... (1 Reply)
Discussion started by: return_user