06-25-2009
To Delete the repeated occurances and print in same line by appending values
Hi All,
I am trying to work on below text
a b c 1
a b c 2
a b c 3
x y z 6
x y z 44
a b c 89
Need to delete the occurances and get in single line like below:
a b c 1 2 3 89
x y z 6 44 89
Please help me i am new into unix scripting .....
---------- Post updated at 03:00 PM ---------- Previous update was at 02:55 PM ----------
Even when i try using a xcel pivot table to do this also doesnt help as output is something like this
abc 1
2
3
89
Xyz 6
44
89
Not getting in same row.......
How to use awk to get this
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I need to delete repeated nos in a file and finally list the count. Can some one assist me?
file:
12345
12345
56345
12345
23896
Output needed:
12345
56345
23896
Total count:3
Thanks (2 Replies)
Discussion started by: gini
2 Replies
2. Shell Programming and Scripting
Hello friends!
Each line of my input file has this format:
word<TAB>tag1<blankspace>lemma<TAB>tag2<blankspace>lemma ... <TAB>tag3<blankspace>lemma
Of this file I need to eliminate all the repeated tags (of the same word) in a line, as in the example here below, but conserving both (all) the... (2 Replies)
Discussion started by: mjomba
2 Replies
3. UNIX for Dummies Questions & Answers
Hi guys,
I already search on the forum but i can't solve this on my own.
I have a lot of files like this:
And i need to print the line with the maximum value in last column but if the value is the same (2 in this exemple for the 3 last lines) i need get the line with the minimum value in... (4 Replies)
Discussion started by: MetaBolic0
4 Replies
4. Shell Programming and Scripting
Gents,
Please can you help me.
Input file
1050 , 9 ,9888
1050 ,10 ,9888
1050 ,11 ,9888
1050 ,13 ,9888
1050 ,15 ,9888
1051 , 9 ,9889
1051 ,12 ,9889
1051 ,15 ,9889
1051 ,18 ,9889
1052 , 9 ... (7 Replies)
Discussion started by: jiam912
7 Replies
5. Shell Programming and Scripting
Hi all,
I have blocks of records like the following, each block ends in = in a new line, I want tabularize the entire output. The pattern is the same in every block although not all types are there in every block.
For example gine3 is absent in the second block but present first and third.
... (7 Replies)
Discussion started by: ritakadm
7 Replies
6. Shell Programming and Scripting
Hi i have some large data files that contain several fields and rows the data in a field have a numeric value that is in a sine wave pattern what i would like todo is locate each peak and pick the highest value and print that complete line. the data looks something like this it is field nr4 which... (4 Replies)
Discussion started by: ninjaunx
4 Replies
7. Shell Programming and Scripting
I am trying to use awk to find all the $3 values in file2 that are between $2 and $3 in file1. If a value in $3 of file2 is between the file1 fields then it is printed along with the $6 value in file1. Both file1 and file2 are tab-delimited as well as the desired output. If there is nothing to... (4 Replies)
Discussion started by: cmccabe
4 Replies
8. Shell Programming and Scripting
datafile:
2017-03-24 10:26:22.098566|5|'No Route for Sndr:RETEK RMS 00040 /ZZ Appl:PF Func:PD Txn:832 Group Cntr:None ISA CntlNr:None Ver:003050 '|'2'|'PFI'|'-'|'EAI_ED_DeleteAll'|'EAI_ED'|NULL|NULL|NULL|139050594|ActivityLog|
2017-03-27 02:50:02.028706|5|'No Route for... (7 Replies)
Discussion started by: SkySmart
7 Replies
9. Shell Programming and Scripting
File1 consist two columns, first some weired ids and second the numbers
t|v203.1@t|k88711.1 0.1
t|v190.1@t|k90369.1 0.01
t|v203.1@t|k88711.1 0.5
t|v322.1@t|k88711.1 0.2
t|v207.1@t|k90369.1 0.11
t|v326.1@t|k85939.1 0.5
t|v207.1@t|k90369.1 0.7
t|v207.1@t|k90369.1 0.3
t|v326.1@t|k89421.1 0.33... (3 Replies)
Discussion started by: ashmit99
3 Replies
10. Shell Programming and Scripting
In the below perl I am trying to extract and print the values AF1=, the GT value, and F or QUAL diveded by 33 (rounded to the nearest whole #). The GT value is at the end after the GT:PL so all the possibilities are read into a hash h, then depending on the value that is in the line the... (1 Reply)
Discussion started by: cmccabe
1 Replies