10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Using awk to extract value after a keyword in an html, and store in ts. The awk does execute but ts is empty. I use the tag as a delimiter and the keyword as a pattern, but there probably is a better way. Thank you :).
file
<html><head><title>xxxxxx xxxxx</title><style type="text/css">
... (4 Replies)
Discussion started by: cmccabe
4 Replies
2. Shell Programming and Scripting
Hi Everyone,
Need help in extracting the hostname from the below output.
Expected output:
DS-TESTB-GDS-1.TEST.ABC.COM
DS-TESTB-GDS-2.TEST.ABC.COM
....
...
/tmp $ cat -n /tmp/patchreport
1 /usr/bin/perl /admin/bin/patch/applyPatches.pl --apply_patches... (4 Replies)
Discussion started by: thiyagoo
4 Replies
3. Shell Programming and Scripting
I have some files containing the following data
# RESIDUE AA STRUCTURE BP1 BP2 ACC N-H-->O O-->H-N N-H-->O O-->H-N TCO KAPPA ALPHA PHI PSI X-CA Y-CA Z-CA
1 196 A M 0 0 230 0, 0.0 2,-0.2 0, 0.0 0, 0.0 0.000 360.0 360.0 360.0 76.4 21.7 -6.8 11.3
2 197 A D + 0 0 175 1,-0.1 2,-0.1 0, 0.0 0, 0.0... (10 Replies)
Discussion started by: edweena
10 Replies
4. Shell Programming and Scripting
Hi ,
I have two files, say KEY_FILE and the MAIN_FILE. I am trying to read the KEY_FILE which has only one column and look for this column data in the MAIN_FILE to extract all the rows that have this key.
I have written a script to do so, but somehow it is not returning all the rows (
It... (4 Replies)
Discussion started by: Sheel
4 Replies
5. UNIX for Dummies Questions & Answers
Hi all,
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
6 Replies
6. Shell Programming and Scripting
Hi Guys,
I have a situation wherein I need to extract two lines from below the search string.
Eg.
Current:
$ 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 Replies
7. Shell Programming and Scripting
Hi.
I have a text test1.txt file like:Receipt
Line1
Line2
Line3
End
Receipt
Line4
Line5
Line6
Canceled
Receipt
Line7
Line8
Line9
End (9 Replies)
Discussion started by: TQ3
9 Replies
8. 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
7 Replies
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
4 Replies
10. Shell Programming and Scripting
Hi
I want to extract certain text between two line numbers like
23234234324 and
54446655567567
How do I do this with a simple sed or awk command?
Thank you.
---------- Post updated at 06:16 PM ---------- Previous update was at 05:55 PM ----------
found it:
sed -n '#1,#2p'... (1 Reply)
Discussion started by: return_user
1 Replies