I have to extract data from a text file which is huge in size >>10GB.
ie between two strings. If I do an ordinary sed it takes forever to come out. I was wondering if there was anyway to do the entire process in reverse and on finding the relevant string is there any way to break out of the... (5 Replies)
I've got hundreds of lines in a file that looks like this:
Line1 CCR CCH
Line2 ICVM FBO GSC
Line3 MKF
The result should be like the one below so that I can insert them on our database.
Line1 CCR
Line1 CCH
Line2 ICVM
Line2 FBO
Line2 GSC
Line3 MKF
Thanks in advance! (4 Replies)
Hi Guys,
Am new to this forum .... And also to shell scripting
I need a k-shell script to reverse the contents of a file...
Please come up with the solutions...
With regards,
Anand (10 Replies)
Hi all
I am trying to numerically reverse sort a file but I seem to be having trouble.
Example of file contents:
text1,1
text2,-1
text3,0
I can sort using sort -k 2n -t, filename without any problems.
However I want my results in descending order but using -r in my command... (2 Replies)
HI all,
i have a file called monitor.cfg and have some sections,under these sections many parameter's are there.
like.....
MONITOR.CFG
p1
p2
p3
#comments
#comments
p4
p5
p6
eof.
i want to add some new parameters in section exactly at end of comments using sed.
Thanks
surya (4 Replies)
Hi,
I am having trouble while using 'sed' with reading files. Please help. I have 3 files. File A, file B and file C. I want to find content of file B in file A and replace it by content in file C.
Thanks a lot!!
Here is a sample of my question.
e.g. (file A: a.txt; file B: b.txt; file... (3 Replies)
Hi all,
Just saw a "sed" format to reverse display the file contents, but am not geting its logic completely. I would appreciate if somebody can explain
sed '1!G;h;$!d' < filename
All I know in this is that :
G will add a new line after every line except first one... (5 Replies)
hi all,
i had the below script
x=`cat input.txt |wc -1`
awk 'NR>1 && NR<'$x' ' input.txt > output.txt
by using above script i am able to remove the head and tail part from the input file and able to append the output to the output.txt but if i run it for second time the output is... (2 Replies)