10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi guys,Got a bit of a bind I'm in. I'm looking to remove duplicates from a pipe delimited file, but do so based on 2 columns. Sounds easy enough, but here's the kicker...
Column #1 is a simple ID, which is used to identify the duplicate.
Once dups are identified, I need to only keep the one... (2 Replies)
Discussion started by: kevinprood
2 Replies
2. Shell Programming and Scripting
Hi All ,
I have a requirement where I need to remove duplicates from a fixed width file which has multiple key columns .Also , need to capture the duplicate records into another file .
File has 8 columns.
Key columns are col1 and col2.
Col1 has the length of 8 col 2 has the length of 3.
... (5 Replies)
Discussion started by: saj
5 Replies
3. UNIX for Dummies Questions & Answers
I have text like this
M83-306 132 797
M83-312 145 685
M83-315 321 479
M83-319 654 193
M83-350 556 1184
M83-303 222 199
and I want to make it like this
M83-306 797
M83-312 685
M83-315 ... (9 Replies)
Discussion started by: muhnandap
9 Replies
4. UNIX for Dummies Questions & Answers
I have a text file that has three columns. But at the end of the text file, there are trailing lines that have missing second and third columns:
4 0.04972604 KLHL28
4 0.0497332 CSTB
4 0.04979822 AIF1
4 0.04983331 DECR2
4 0.04990344 KATNB1
4
4
4
4
How can I remove the trailing... (3 Replies)
Discussion started by: evelibertine
3 Replies
5. Shell Programming and Scripting
HI ,
I have a comma delimiter file, in which I want to remove 8th and 9th column.
I tried removing those columns using the below code
awk 'BEGIN { FS=","; OFS="," } {$8=$9="";gsub(",+",",",$0)}1' infile
But the problem is 8th and 9th columns are user entered fields, theyvhave carriage... (1 Reply)
Discussion started by: mora
1 Replies
6. Shell Programming and Scripting
HI ,
I want to remove 5th and 6th column from a .csv file using awk.is there any way of this apart from writing the each field as below
awk -F, '{print $1,$2,$3,$7......$100}' OFS=, infile.
Thx,
Deepti (4 Replies)
Discussion started by: gaur.deepti
4 Replies
7. Shell Programming and Scripting
My files look like this
I need to remove the columns where dashes are the majority, if any of the sequences has any character in that particular position it should be removed too. The IDs and Freqs should be kept intact. Thus, the resulting file should look like this
Thanks in advance (14 Replies)
Discussion started by: Xterra
14 Replies
8. Shell Programming and Scripting
Hi,
I have a sample file as shown below --
id parent name dba
-----------------------------------... (7 Replies)
Discussion started by: sumirmehta
7 Replies
9. Shell Programming and Scripting
Hello Friends,
Can any one help me with this issue:
I would like to format a file:
say if I have rows like:
4512 , SMITH , I-28984 ,, 4324 , 4343
42312 , SMITH , I-2EE8984 ,, 432E4E4 , 4343
I would like to have the output diaplayed like :
4512... (8 Replies)
Discussion started by: sbasetty
8 Replies
10. HP-UX
Hi,
I am trying to add space after 3rd and 6th column for editing a file in special format. How should I achieve in VI?. So, is it possible to do in it in sed ?
thanks
vipa (1 Reply)
Discussion started by: vipas
1 Replies