08-12-2009
copy and paste certain many lines of huge file in linux
Dear All,
I am working with windoes OS but remote a linux machine. I wonder the way to copy an paste some part of a huge file in linux machine.
the contain of file like as follow:
...
dump annealling all custom 10 anneal_*.dat id type x y z q
timestep 0.02
run 200000
Memory usage per processor = 3.00831 Mbytes
Step PotEng TotEng Temp Press
0 -131593.2 -131593.2 0 -366874.47
1 -131593.21 -130252.7 300.0085 -364406.93
2 -131600.16 -130259.62 300.017 -358658.77
3 -131607.06 -130266.48 300.0255 -352910.17
4 -131613.76 -130273.14 300.034 -347161.71
5 -131620.4 -130279.74 300.0425 -341413.54
undump annealing
6 -131626.83 -130286.13 300.051 -335666.21
7 -131633.21 -130292.48 300.0595 -329919.85
8 -131639.43 -130298.66 300.068 -324175
9 -131645.52 -130304.7 300.0765 -318431.95
10 -131651.44 -130310.59 300.085 -312691.1
...
I want to copy and paste data from 1 to 5( between senteces "step ..." and "undump unnealing".
Of course its easy by using clicking mouse right in case it is only 5 lines. But what I want to do is copy and paste more than 10.000 lines.
I highly appreciate any help from you
thank you in advance
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have to delete 1st 7000 lines of a file which is 12GB large. As it is so large, i can't open in vi and delete these lines. Also I found one post here which gave solution using perl, but I don't have perl installed. Also some solutions were redirecting the o/p to a different file and renaming it.... (3 Replies)
Discussion started by: rahulrathod
3 Replies
2. Shell Programming and Scripting
Hi all,
I'm a unix newb andI'm trying to write a script that can copy some text paste it in a certian place and then add a number. It's not really clear but I'll show an example.
what the file looks like right now:
Linux 2.6.24-24-generic (abc) 07/15/09
23:25:01 CPU ... (6 Replies)
Discussion started by: the1hand3r
6 Replies
3. Solaris
Hello,
Can anybody please tell me how we can copy and paste text from a word document into a text file that we are editing in vi? Is it possible to do that while we are editing the text file in vi in insert mode?
Thanks, (3 Replies)
Discussion started by: Pouchie1
3 Replies
4. Shell Programming and Scripting
I have this text file with a very large number of columns (10,000+) and I want to move the first column to the position of the six column so that the text file looks like this:
Before cutting and pasting
ID Family Mother Father Trait Phenotype
aaa bbb ... (5 Replies)
Discussion started by: evelibertine
5 Replies
5. UNIX for Advanced & Expert Users
Hi All,
I have a very huge file (4GB) which has duplicate lines. I want to delete duplicate lines leaving unique lines. Sort, uniq, awk '!x++' are not working as its running out of buffer space.
I dont know if this works : I want to read each line of the File in a For Loop, and want to... (16 Replies)
Discussion started by: krishnix
16 Replies
6. Shell Programming and Scripting
into small files. i need to add a head.txt and tail.txt into small files at the begin and end, and give a name as q1.xml q2.xml q3.xml ....
thank you very much. (2 Replies)
Discussion started by: dtdt
2 Replies
7. Shell Programming and Scripting
Please help me. This is simple, but urgent problem for me. :(
I have a two files
file1
1 2 3 4 5 6
1 2 3 4 5 6
1 2 3 4 5 6
.....
file2
11 12 13 14 15
11 12 13 14 15
11 12 13 14 15
.....
1) I hope to make a new file, file 3, that consists of 2nd... (2 Replies)
Discussion started by: exsonic
2 Replies
8. UNIX for Dummies Questions & Answers
hi,
I have Multiple files with the following data :
File1
100414 DR1
END
XXXXX
Test1 Test2 Test3
Test4 Test5 Test6
END
100514 DR2
END
XXXXX
Test7 Test8 Test9
Test10 Test11 Test12
END
100614 DR3 (5 Replies)
Discussion started by: newageBATMAN
5 Replies
9. Shell Programming and Scripting
I have a really big XML file. I need copy the value of one tag inside another one tag. I try to publish one example.
<channel update="i" site="merge-xmltv" site_id="" xmltv_id="Rai 1">Rai 1</channel>
<channel update="i" site="merge-xmltv" site_id="" xmltv_id="Rai 1 +2HD">Rai 1... (6 Replies)
Discussion started by: Tapiocapioca
6 Replies
10. Shell Programming and Scripting
Hi I have a text file with lines beginning with 71303, 71403, 71602,
I need to copy the 10 digit text at position 30 on lines beginning with 71303 (5500011446) to position 99 on every line beginning with 71602 (see example below),
There may be many 71303 lines but I need the text copying to... (2 Replies)
Discussion started by: firefox2k2
2 Replies
TERM(7) Miscellaneous Information Manual TERM(7)
NAME
terminals- conventional names
DESCRIPTION
These names are used by certain commands and are maintained as part of the shell environment (see sh(1),environ(5)).
1620 DIABLO 1620 (and others using HyType II)
1620-12 same, in 12-pitch mode
300 DASI/DTC/GSI 300 (and others using HyType I)
300-12 same, in 12-pitch mode
300s DASI/DTC 300/S
300s-12 same, in 12-pitch mode
33 TELETYPE(R) Model 33
37 TELETYPE Model 37
40-2 TELETYPE Model 40/2
43 TELETYPE Model 43
450 DASI 450 (same as Diablo 1620)
450-12 same, in 12-pitch mode
450-12-8 same, in 12-pitch, 8 lines/inch mode
735 Texas Instruments TI735 (and TI725)
745 Texas Instruments TI745
dumb terminals with no special features
hp Hewlett-Packard HP264? series terminals
4014 Tektronix 4014
tn1200 General Electric TermiNet 1200
tn300 General Electric TermiNet 300
vt05 Digital Equipment Corp. VT05
Commands whose behavior may depend on the terminal accept arguments of the form -Tterm, where term is one of the names given above. If no
such argument is present, a command may consult the shell environment for the terminal type.
SEE ALSO
stty(1), tabs(1), plot(1), sh(1), environ(5)
troff(1) for nroff
BUGS
The programs that ought to adhere to this nomenclature do so only fitfully.
TERM(7)