10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a data of 1 lac lines with the following format
abcde,1,2,3,4,
,ee
,ff
,gg
,hh
,mm
abcde,3,4,5,6,
,we
,qw
,as
,zx
,cf
abcde,1,5,6,7,
,dd
,aa
,er
....
.... (6 Replies)
Discussion started by: aravindj80
6 Replies
2. Shell Programming and Scripting
Hi,
I need to concatenate some lines in a file based on the First 4 coloumns of a file .. (For Eg.)
Consider a file ...
I,01,000002,0666,00000.00,000,00,000,000, ,0
I,01,000002,0667,00000.00,000,00,000,000, ,0
I,01,000002,0666,00056.10
I,01,000002,0667,00056.10
I,01,000002,0666,00001... (6 Replies)
Discussion started by: Sri3001
6 Replies
3. Shell Programming and Scripting
Hi
I'm quite new with linux.
Very simple, I need to swap every 2 lines in a file.
Example
INPUT:
a a a
b b b
x x x
y y y
s s s
t t t
OUTPUT:
b b b
a a a
y y y
x x x
t t t (5 Replies)
Discussion started by: hernand
5 Replies
4. Shell Programming and Scripting
Hi,
I have an ASCII text file where some of the lines are ending with '+' character.
I have to concatenate the next successive line with those lines having the trailing '+' char by removing that char.
The below awk code has some problems to do this task:
awk '{while(sub(/\+$/,"")) {... (12 Replies)
Discussion started by: royalibrahim
12 Replies
5. Shell Programming and Scripting
Hi,
I'm attempting to join two lines in a file which are separated by a line break. The file contents are shown below:
event_id=0
id=0_20100505210853
IFOconfig=HLV
template=TaylorF2
Nlive=1000.0
Nruns=1.0
NIFO=3... (7 Replies)
Discussion started by: Supersymmetric
7 Replies
6. Shell Programming and Scripting
For example:
File 1:
abc def ghi
jkl mno pqr
File 2:
stu vwx yza
bcd efg hij
klm nop qrs
I want the reult to be:
abc def ghistu vwx yza
jkl mno pqrbcd efg hij
klm nop qrs (4 Replies)
Discussion started by: tamahomekarasu
4 Replies
7. Shell Programming and Scripting
Hi,
I have put a similar question in one of the other threads through which I got the solution shown below but I have some more condition to add to it, hence have further queries on it. I appologies if I should be putting this with the old thread.
I have a file which perform a grep on the... (1 Reply)
Discussion started by: simi28
1 Replies
8. Shell Programming and Scripting
I made a script that can swap info on two lines using a combination of awk and sed, but was hoping to consolidate the script to make it run faster. If found this script, but can't seem to get it to work in a bash shell. I keep getting the error "Too many {'s". Any help here would be appreciated:... (38 Replies)
Discussion started by: LaTortuga
38 Replies
9. Shell Programming and Scripting
hi
My requirement is i have a file with some records like this
file name ::xyz
a=1
b=100,200
,300,400
,500,600
c=700,800
d=900
i want to change my file
a=1
b=100,200,300,400
c=700,800
d=900
if record starts with " , " that line should fallows the previous line.please give... (6 Replies)
Discussion started by: srivsn
6 Replies
10. Shell Programming and Scripting
Hi,
I have a html file which is unformatted and need to concatenate the lines between each "table" statement in order to run an awk statement on it. Here is the example of the raw file:
<table border="0" cellspacing="0" cellpadding="0" class="playerDetails">
def
... (3 Replies)
Discussion started by: Tonka52
3 Replies