The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Need Help: Collecting similar messages in a file ashish.kapil Shell Programming and Scripting 2 01-16-2008 02:57 AM
Command similar to doskey halel UNIX for Dummies Questions & Answers 4 05-16-2006 04:49 AM
Similar Forum for MS Access? vcardo10 UNIX for Dummies Questions & Answers 2 12-30-2003 06:42 AM
Would need a friend on the net, someone who knows a lot of UNIX or similar... zeus Security 0 06-23-2003 02:36 PM
from dos dir a: to similar to a dds tape? yls177 Shell Programming and Scripting 3 11-07-2002 07:30 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-21-2008
Registered User
 

Join Date: Mar 2008
Posts: 10
similar words

hi

i have created a pipe which outputs a list of words such as:

Code:
hello
yay
foo
yah
good
goof
and from this i want to find words which only differ by their last letters ie yay/yah and good/goof.

i would only need to print out the first instance of the word.
these words are not always adjacent as even after sorting, there may be other words which come in between these.

any ideas anyone?
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 03-22-2008
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,450
good/goof and yah/yay will be adjacent after a sort. The only words that could separate them would be stuff like gooe and yap, thus giving you a triple instead of a double match.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 11:46 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0