10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'm trying to remove a specific number of lines, above and below a specific line of text, highlighted in red:
<STMTTRN>
<TRNTYPE>CREDIT
<DTPOSTED>20151205000001
<TRNAMT>10
<FITID>667800001
<CHECKNUM>667800001
<MEMO>BALANCE
</STMTTRN>
<STMTTRN>
<TRNTYPE>DEBIT
<DTPOSTED>20151207000001... (8 Replies)
Discussion started by: bomsom
8 Replies
2. Shell Programming and Scripting
I have a folder containing text files. I need to extract specific lines from the files of this folder based on another file input.txt. How can I do this with awk/sed?
file1
ARG 81.9 8 81.9 0
LEU 27.1 9 27.1 0
PHE .0 10 .0 0
ASP 59.8 11 59.8 0
ASN 27.6 12 27.6 0
ALA .0 13 .0 0... (5 Replies)
Discussion started by: alanmathew84
5 Replies
3. Shell Programming and Scripting
This is an extract from a large file. The lines that start with fc are ports on a fabric switch. In between each fc port there is information about the port.
fc2/12 is up
Port description is SEIEDISCOVER-3
Speed is 4 Gbps
fc2/13 is down (Administratively down)
fc2/14 is up
Port... (1 Reply)
Discussion started by: kieranfoley
1 Replies
4. Shell Programming and Scripting
Hi
This is my first post and I'm just a beginner. So please be nice to me.
I have a couple of html files where a pattern beginning with "http://www.site.com" and ending with "/resource.dat" is present on every 241st line. How do I extract this to a new text file?
I have tried sed -n 241,241p... (13 Replies)
Discussion started by: dejavo
13 Replies
5. Shell Programming and Scripting
Hi,
I have a file which contains DDL statements- CREATE TABLE, CREATE INDEX, ALTER TABLE etc.
I have to only pick CREATE TABLE statements from the file-
Source :
----------------------------------------------
--DDL for table abc
--------------------------------------------
CREATE TABLE... (4 Replies)
Discussion started by: newb
4 Replies
6. Shell Programming and Scripting
Hello everybody!
I am quit new here and hope you can help me.
Using an awk script I am trying to extract data from several files. The structure of the input files is as follows:
TimeStep parameter1 parameter2 parameter3 parameter4
e.g.
1 X Y Z L
1 D H Z I
1 H Y E W
2 D H G F
2 R... (2 Replies)
Discussion started by: Daniel8472
2 Replies
7. Linux
Hello! All,
Could you please tell me how to get a specific line number from a text file?
For example below,
ABC
DEF ---> Get this line number, return to an variable
GHI
My OS is Linux.
Thank you so much for your help in advance! (3 Replies)
Discussion started by: barryxian
3 Replies
8. UNIX for Dummies Questions & Answers
I would like to extract specific lines from a file and output them into another file.
Each line in the file has a unique ID, and I have a specific list of IDs (that are not consecutive) that I wish to extract.
for example:
1 aaaaaa bbbcb cccccc
2 aaaaaa bbbbb cccccd
3 aaaaaa bbbab... (6 Replies)
Discussion started by: mert2481
6 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. UNIX for Dummies Questions & Answers
hi,
how would i extract a range of lines in a file by using the line number? ex: file contains:
1 title
2 i want
3 this part
4 to be taken out
5 from this file
6 and sent to
7 another file
8 not needed
9 end of file
In this case, i want to copy line number 2 to 7 on a new... (2 Replies)
Discussion started by: apalex
2 Replies