10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Guys,
Could you please advise how to join multiple details lines into single row, with HEADER 1 as the record separator and comma(,) as the field separator.
Input:
HEADER 1, HEADER 2, HEADER 3,
11,22,33,
COLUMN1,COLUMN2,COLUMN3,
AA1, BB1, CC1,
END: ABC
HEADER 1, HEADER 2,... (3 Replies)
Discussion started by: budz26
3 Replies
2. Shell Programming and Scripting
Hello all,
I want to join 2 tabbed files on the first 2 fields, and filling the missing values with 0. The 3rd column in each file is constant for the entire file.
file1
12658699 ST5 XX2720 0 1 0 1
53039541 ST5 XX2720 1 0 1.5 1
file2 ... (6 Replies)
Discussion started by: sheetalk
6 Replies
3. Shell Programming and Scripting
I have an input file like this...
All iI want to do is If the lines are identical except for the last field i want to merge them into single line
input_file
I feel something is nothing
I feel something is everything
apple mango banana
apple mango grapes
I want to get output like this:... (3 Replies)
Discussion started by: raj_k
3 Replies
4. Shell Programming and Scripting
Hi
I have a file like
1 2
1 2 3
1 5 6
11 12
10 2
7 5
17 12
I would like to have an output as
1 2 3 5 6 10 7
11 12 17
any help would be highly appreciated
Thanks (4 Replies)
Discussion started by: Harrisham
4 Replies
5. Shell Programming and Scripting
Hi
I have a source file ( written i C ) where a funtion call is spread over multiple lines, for example :
func(
a,
b,
c
);
I want this to be joined into one single line :
func(a,b,c);
How can this be done with awk and sed ?
Regards. Hench (2 Replies)
Discussion started by: hench
2 Replies
6. Shell Programming and Scripting
I have two files,
file1.txt:
1 abc
2 def
2 dgh
3 ijk
4 lmn
file2.txt
1 opq
2 rst
3 uvw
My desired output is:
1 abc opq
2 def rst
2 dgh rst
3 ijk uvw (2 Replies)
Discussion started by: xan.amini
2 Replies
7. UNIX for Dummies Questions & Answers
Hi, I need help with the join command
I have 2 files that I want to join on multiple fields.
I want to return all records from file 1
I also want empty fields in my joined file if there isn't a match in file 2
I have already sorted them so I know they are in the same order.
file1 ... (0 Replies)
Discussion started by: shunter0810
0 Replies
8. Shell Programming and Scripting
Hi guys,
anyone know how can i join multiples lines using sed till the end of a file and output to another file in a single line?
The end of each line will be replaced with a special char "#".
I am using the below SED command, however it seems to remove the last 2 lines. Also not all lines... (12 Replies)
Discussion started by: DrivesMeCrazy
12 Replies
9. Shell Programming and Scripting
Hi,
I have data with broken lines:
Sample data:
"12"|"25"|"a"|"b"|"c"|"d"|"e"|"f"|"2453748"|"08:10:50"
"16"|"25"|"a"|"b"|"c"|"d"|"e"|"f"|"
2453748"|"08:15:50"
"16"|"25"|"a"|"b"|"
c"|"d"|"e"|"f"|"2453748"|"08:19:50"
"16"|"25"|"a"|"b"|"c"|"d"|"e"|"f"|"2453748"|"08:19:50"
In the... (5 Replies)
Discussion started by: hitmansilentass
5 Replies
10. Shell Programming and Scripting
Is it possible to do a join on multiple fields of two files? I am trying to do something like join -t, -1 2,3 -2 2,3 -o 2.1,2.2,2.3,1.3 filea fileb
I want the join to be on columns 2 and 3 of filea and columns 2 and 3 of fileb.
What is hapenning is that the second file that I want to do the join... (1 Reply)
Discussion started by: reggiej
1 Replies