How to extract multiple line in a paragraph? Please help.
Hi all,
The following lines are taken from a long paragraph:
How can I extract some lines starting from "1\1\GINC-COMPUTE-1-3..." to the END???
like this:
I searched in this forum and found a script "
If there is a blank line before the line "1\1\GINC-COMPUTE-1-3"", it should work.
Unfortunately, there is no blank line before the line "1\1\GINC-COMPUTE-1-3"". How can I modify this script?
Eventually, I want to get a coordinate file like this:
Is that possible? I think it would be a tough task to do with "awk".
Please help. Thanks a lot!
ZHEN
Last edited by liuzhencc; 04-29-2010 at 11:16 PM..
Hi,
Its been a long time since I have used Bash to write a script so am really struggling here. Need the gurus to help me out.
uname -a
Linux lxserv01 2.6.18-417.el5
i have a text file with blocks of code written in a similar manner
******* BEGIN MESSAGE *******
Station /... (12 Replies)
Hello:
Have a very annoying problem:
Need to extract paragraphs with a specific string in them from a very large file
with a repeating record separator.
Example data: a file called test.out
CREATE VIEW view1
AS something
FROM table1 ,table2 as A, table3 (something FROM table4)
FROM... (15 Replies)
I am using OSX. I have a multi-mol2 file (text file with coordinates and info for several molecules). An example of two molecules in the file is given below for molecule1 and molecule 2. The total file contains >50,000 molecules.
I would like to extract out and write to another file only the... (2 Replies)
Hello
I have an output that has a string between quotes and another between square brackets on the same line. I need to extract these 2 strings Example line
Device "nrst3a" attributes=(0x4) RAW SERIAL_NUMBER=SNL2
Output should look like
nrst3a VD073AV1443BVW00083
I was trying with sed... (3 Replies)
Hi,
I search all forum, but I can not find solutions of my problem :(
I have multiple files (5000 files), inside there is this data :
FILE 1:
1195.921 -898.995 0.750312E-02-0.497526E-02 0.195382E-05 0.609417E-05
-2021.287 1305.479-0.819754E-02 0.107572E-01 0.313018E-05 0.885066E-05
... (15 Replies)
Dear all,
I'm trying to manipulate a data file and putting a certain lines into one paragraph.
What am I actually want to do is that search some lines in a data file. These lines begin with "1\1\GINC-" and end with "\\@" or the following two empty lines as shown in blue.
A part of the text... (11 Replies)
Hi,
I have a directory full of *.txt files. I would like to print the last line of every file to screen.
I know you can use FNR for printing the first line of each file, but how do I access the last line of each file?
This code doesn't work, it only prints the last line of the last file:BEGIN... (5 Replies)
Hi
I have the following requirement. i have the following line from a log file
one : two : Three : four : five : six : seven : eight :nine :ten
Now can you pls help what i should do to get only the following output from the above line
two : five : six : seven : Eight
appreciate your... (3 Replies)
Hi ,
Unix.com has been life saver for me I admit :)
I am trying to extract a paragraph based on matching pattern "CREATE TABLE " from a ddl file . The paragraphs are seperated by blank line .
Input file is
#cat zip.20080604.sql1
CONNECT TO TST103
SET SESSION_USER OPSDM002
... (2 Replies)
i would like to ask how to make a script that in evry 3 lines of my paragraph(below) it would appear like this:
$ cat myparagraph
this is line 1
this is line 2
this is line3
this is line 4
this is 5
this 6
this is 7
this 8
====================================================
$ cat... (2 Replies)