Removing identical words in column


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Removing identical words in column
# 8  
Old 09-28-2010
Code:
awk '! a[$1] {a[$1]++;print $1;next}{print FS $2}' infile

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to use regex on particular column (Removing comma from particular column)?

Hi, I have pipe separated file which contains some data having comma(,) in it. I want to remove the comma(,) only from particular column without changing data in other columns. Below is the sample data file, I want to remove the comma(,) only from 5th column. $ cat file1 ABC | DEF, HIJ|... (6 Replies)
Discussion started by: Prathmesh
6 Replies

2. Shell Programming and Scripting

removing the words with symbols in a file in unix

I have file like below Hi iam author <br>joseph</br> in france. I live in my home <br></br> but no food. I will play footbal <br></br> but i wont play cricket. I will read all the books <br>all fiction stories</br> i hate horror stories. I want output like below Hi iam author... (3 Replies)
Discussion started by: vinothsekark
3 Replies

3. Shell Programming and Scripting

Conditional removing of words from a line

Hi , I have a .csv file,from which I want to remove some data from each column as below. Source Data GT_12_AUDIT,SCHEDULED,NOZOMI2010/GT_12_AUDIT,CTSCAN/Zh_GT_6547887/GT_12_AUDIT,CTSCAN/Zh_GT_6547887... (3 Replies)
Discussion started by: gaur.deepti
3 Replies

4. UNIX for Dummies Questions & Answers

deleting words in list with more than 2 identical adjacent characters

Morning Guys & Gals, I am trying to figure out a way to remove lines from a file that have more than 2 identical characters in sequence.. So if for instance the list would look like ; the output would be ; I can't seem to get my head around perl (among many other... (7 Replies)
Discussion started by: TAPE
7 Replies

5. SuSE

finding and removing block of identical strings

i have a problem in finding block of identical strings...i solved the problem in finding consecutive identical words and now i want to expand the code in order to find and remove consecutive identical block of strings... for example the awk code removing consecutive identical word is:... (2 Replies)
Discussion started by: cocostaec
2 Replies

6. Programming

finding and removing block of identical strings

i have a problem in finding block of identical strings...i solved the problem in finding consecutive identical words and now i want to expand the code in order to find and remove consecutive identical block of strings... for example the awk code removing consecutive identical word is:... (2 Replies)
Discussion started by: cocostaec
2 Replies

7. Shell Programming and Scripting

finding and removing block of identical strings

i have a problem in finding block of identical strings...i solved the problem in finding consecutive identical words and now i want to expand the code in order to find and remove consecutive identical block of strings... for example the awk code removing consecutive identical word is:... (2 Replies)
Discussion started by: cocostaec
2 Replies

8. Shell Programming and Scripting

finding and removing 2 identical consecutive words in a text

i want to write a shell script that correct a text file.for example if i have the input file: "john has has 2 apples anne has 3 oranges oranges" i want that the output file be like this: "john has 2 apples anne has 3 oranges" i've tried to read line by line from input text file into array... (11 Replies)
Discussion started by: cocostaec
11 Replies

9. Shell Programming and Scripting

removing 2 words from file.

Hi All, I have a text file with name of source files in that. source files ends with .mxml and .css. Now I want to remove the extensions of these source files. Currently I can do so by writing 2 sed commands, as there are files with just 2 different extensions. But I want to do it in one sed... (6 Replies)
Discussion started by: mkashif
6 Replies

10. Shell Programming and Scripting

Removing uppercase words from textfiles

I have the task of removing all uppercase words from csv files, mit 10000's lines. I think it shoud be possible with regex's, something like "s/{2,}//g" but I can't get it work with sed or Vi. It would also be possible to script in ksh, awk, perl or python. example this "this is a EXAMPLE... (5 Replies)
Discussion started by: frieling
5 Replies
Login or Register to Ask a Question
XORG(7) 						 Miscellaneous Information Manual						   XORG(7)

NAME
X.Org, XProjectTeam - X.Org Group information SYNOPSIS
Release 6.5 and 6.6 of X Version 11 was brought to you by The X.Org Group. Release 6.4 of X Version 11 was brought to you by The X Project Team. DESCRIPTION
The Open Group's X Project Team was created as the successor to the X Consortium, Inc., after the X Consortium ceased operations and trans- ferred ownership of X11 to The Open Group. The X.Org Group (hereinafter called "X.Org") was created as the successor to The X Project Team after the The Open Group ceased operating The X Project Team. The purpose of X.Org was to foster development, evolution, and maintenance of the X Window System. X.Org operates under the corporate umbrella of The Open Group. The X Consortium was an independent, not-for-profit Delaware membership corporation. It was formed in 1993 as the successor to the MIT X Consortium. The X Window System was created in the mid-1980s at the Massachusetts Institute of Technology. In 1988, MIT formed a member-funded consor- tium to provide the technical and administrative leadership necessary to support further development of the X Window System. In 1992, MIT and the membership decided it was in their best interests to move the consortium out of MIT and create an independent, stand-alone organi- zation. All rights to the X Window System were assigned by MIT to X Consortium, Inc. on January 1, 1994. On December 31, 1996 the X Con- sortium, Inc. closed its doors and all rights to the X Window System were assigned to The Open Group. ADDRESS
To reach The Open Group public World Wide Web server, use http://www.opengroup.org/. To reach The X.Org public World Wide Web server, use http://www.x.org/. To reach The X.Org public ftp machine, use anonymous ftp at ftp://ftp.x.org/ FULL MEMBERS
Attachmate Barco Compaq Hewlett-Packard Hummingbird IBM ICS Metro Link MITRE Shiman Associates Silicon Graphics Incorporated Starnet Communications Sun Microsystems The XFree86 Project US Navy WRQ Xi Graphics X Version 11 xorg-docs 1.6 XORG(7)