Sponsored Content
Top Forums Shell Programming and Scripting Help with remove duplicated content Post 302549137 by perl_beginner on Sunday 21st of August 2011 10:53:24 PM
Old 08-21-2011
Help with remove duplicated content

Input file:
Code:
hcmv-US25-2-3p	hsa-3160-5
hcmv-US33 hsa-47
hcmv-UL70-3p hsa-4508
hcmv-UL70-3p hsa-4486
hcms-US25 hsa-360-5
hcms-US25 hsa-4
hcms-US25 hsa-458
hcms-US25 hsa-44812
.
.

Desired Output file:
Code:
hcmv-US25-2-3p	hsa-3160-5
hcmv-US33 hsa-47
hcmv-UL70-3p hsa-4508
	     hsa-4486
hcms-US25 hsa-360-5
	  hsa-4
	  hsa-458
	  hsa-44812
.
.

I would like to remove those duplicate content based on column 1.
Many thanks for any advice.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

remove duplicated xml record in a file under unix

Hi, If i have a file with xml format, i would like to remove duplicated records and save to a new file. Is it possible...to write script to do it? (8 Replies)
Discussion started by: happyv
8 Replies

2. Shell Programming and Scripting

remove duplicated lines without sort

Hi Just wondering whether or not I can remove duplicated lines without sort For example, I use the command who, which shows users who are logging on. In some cases, it shows duplicated lines of users who are logging on more than one terminal. Normally, I would do who | cut -d" " -f1 |... (6 Replies)
Discussion started by: lalelle
6 Replies

3. Shell Programming and Scripting

remove duplicated columns

hi all, i have a file contain multicolumns, this file is sorted by col2 and col3. i want to remove the duplicated columns if the col2 and col3 are the same in another line. example fileA AA BB CC DD CC XX CC DD BB CC ZZ FF DD FF HH HH the output is AA BB CC DD BB CC ZZ FF... (6 Replies)
Discussion started by: kamel.seg
6 Replies

4. UNIX for Dummies Questions & Answers

How to remove duplicated based on longest row & largest value in a column

Hii i have a file with data as shown below. Here i need to remove duplicates of the rows in such a way that it just checks for 2,3,4,5 column for duplicates.When deleting duplicates,retain largest row i.e with many columns with values should be selected.Then it must remove duplicates such that by... (11 Replies)
Discussion started by: reva
11 Replies

5. Shell Programming and Scripting

Remove rows with first 4 fields duplicated in awk

Hi, I am trying to use awk to remove all rows where the first 4 fields are duplicates. e.g. in the following data lines 6-9 would be removed, leaving one copy of the duplicated row (row 5) Borgarhraun FH9822 ol24 FH9822_ol24_m20 ol Deformed c Borgarhraun FH9822 ol24 ... (3 Replies)
Discussion started by: tomahawk
3 Replies

6. Shell Programming and Scripting

How to remove duplicated lines?

Hi, if i have a file like this: Query=1 a a b c c c d Query=2 b b b c c e . . . (7 Replies)
Discussion started by: the_simpsons
7 Replies

7. Shell Programming and Scripting

Merge files and remove duplicated rows

In a folder I'll several times daily receive new files that I want to combine into one big file, without any duplicate rows. The file name in the folder will look like e.q: MissingData_2014-08-25_09-30-18.txt MissingData_2014-08-25_09-30-14.txt MissingData_2014-08-26_09-30-12.txt The content... (9 Replies)
Discussion started by: Bergans
9 Replies

8. Shell Programming and Scripting

How to remove duplicated column in a text file?

Dear all, How can I remove duplicated column in a text file? Input: LG10_PM_map_19_LEnd 1000560 G AA AA AA AA AA GG LG10_PM_map_19_LEnd 1005621 G GG GG GG AA AA GG LG10_PM_map_19_LEnd 1011214 A AA AA AA AA GG GG LG10_PM_map_19_LEnd 1011673 T TT TT TT TT CC CC... (1 Reply)
Discussion started by: huiyee1
1 Replies

9. AIX

Remove duplicated bootlist entries

Hello. I have a server with 2 boot disk but in the bootlist there are 5 paths of one disk but no path of the other. How can I remove paths from one disk to insert paths from the other disk? Thanks in advance. server074:root:/# bootlist -om normal hdisk0 blv=hd5 pathid=0 hdisk0... (7 Replies)
Discussion started by: Gabriander
7 Replies

10. Shell Programming and Scripting

Remove duplicated records and update last line record counts

Hi Gurus, I need to remove duplicate line in file and update TRAILER (last line) record count. the file is comma delimited, field 2 is key to identify duplicated record. I can use below command to remove duplicated. but don't know how to replace last line 2nd field to new count. awk -F","... (11 Replies)
Discussion started by: green_k
11 Replies
IMAGEARC(3)								 1							       IMAGEARC(3)

imagearc - Draws an arc

SYNOPSIS
bool imagearc (resource $image, int $cx, int $cy, int $width, int $height, int $start, int $end, int $color) DESCRIPTION
imagearc(3) draws an arc of circle centered at the given coordinates. PARAMETERS
o $ image -An image resource, returned by one of the image creation functions, such as imagecreatetruecolor(3). o $cx - x-coordinate of the center. o $cy - y-coordinate of the center. o $width - The arc width. o $height - The arc height. o $start - The arc start angle, in degrees. o $end - The arc end angle, in degrees. 0o is located at the three-o'clock position, and the arc is drawn clockwise. o $color - A color identifier created with imagecolorallocate(3). RETURN VALUES
Returns TRUE on success or FALSE on failure. EXAMPLES
Example #1 Drawing a circle with imagearc(3) <?php // create a 200*200 image $img = imagecreatetruecolor(200, 200); // allocate some colors $white = imagecolorallocate($img, 255, 255, 255); $red = imagecolorallocate($img, 255, 0, 0); $green = imagecolorallocate($img, 0, 255, 0); $blue = imagecolorallocate($img, 0, 0, 255); // draw the head imagearc($img, 100, 100, 200, 200, 0, 360, $white); // mouth imagearc($img, 100, 100, 150, 150, 25, 155, $red); // left and then the right eye imagearc($img, 60, 75, 50, 50, 0, 360, $green); imagearc($img, 140, 75, 50, 50, 0, 360, $blue); // output image in the browser header("Content-type: image/png"); imagepng($img); // free memory imagedestroy($img); ?> The above example will output something similar to:[NOT DISPLAYABLE MEDIA]Output of example : Drawing a circle with imagearc() SEE ALSO
imagefilledarc(3), imageellipse(3), imagefilledellipse(3). PHP Documentation Group IMAGEARC(3)
All times are GMT -4. The time now is 05:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy