The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Remove Similar Lines from a File Nysif Steve Shell Programming and Scripting 4 03-13-2009 03:49 AM
Urgent help needed on merging lines with similar words awb221 Shell Programming and Scripting 3 02-23-2009 11:16 PM
Deleting the similar lines avi.skynet Shell Programming and Scripting 2 02-02-2009 05:09 AM
Urgent : Merge similar lines rakeshou Shell Programming and Scripting 2 09-10-2008 12:06 AM
awk - Counting number of similar lines dhanamurthy Shell Programming and Scripting 8 05-16-2008 07:00 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 05-04-2009
adambot adambot is offline
Registered User
  
 

Join Date: May 2009
Posts: 5
merging similar lines

Greetings, I have been trying to merge the following lines:
Code:
Sat. May 9 8:00 PM
Sat. May 9 8:00 PM CW
Sat. May 9 8:00 PM CW Cursed
Sat. May 9 9:00 PM
Sat. May 9 9:00 PM CW
Sat. May 9 9:00 PM CW Sanctuary
Sat. May 16 8:00 PM
Sat. May 16 8:00 PM CW
Sat. May 16 8:00 PM CW Sanctuary
Sat. May 16 9:00 PM
Sat. May 16 9:00 PM CW
Sat. May 16 9:00 PM CW Fever
Sat. May 16 9:00 PM CW Fever #1.21
however when i run the following:
Code:
uniq -u -i -f6
I still get this:
Code:
Sat. May 9 8:00 PM CW Cursed
Sat. May 9 9:00 PM CW Sanctuary
Sat. May 16 8:00 PM CW Sanctuary
Sat. May 16 9:00 PM CW Fever
Sat. May 16 9:00 PM CW Fever #1.21
why doesn't the second and third (the sanctuary lines) merge?

Also -- is there a way to do this with a perl script with the added requirement that if there is something like #1.21 then it keeps that line over the one that does not have it?

thanks!!
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 06:15 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0