Re: Grep uniqueness issue

2005-07-29 Thread Tom Allison
Ankur Gupta wrote: [EMAIL PROTECTED] wrote: Hey Guys I am having an odd problem using grep to ensure an array only contains distinct entries. I have a list similar to the following in a file (short example of a much longer list) support01-FastEthernet1/0 suppor

RE: Grep uniqueness issue

2005-07-29 Thread Ankur Gupta
[EMAIL PROTECTED] wrote: > Hey Guys > > I am having an odd problem using grep to ensure an array only > contains distinct entries. > > I have a list similar to the following in a file (short example of a > much longer list) > > support01-FastEthernet1/0 > support01-R

Re: Re: Grep uniqueness issue

2005-07-29 Thread jason_normandin
ate: 2005/07/29 Fri AM 11:32:15 EDT > To: [EMAIL PROTECTED] > CC: beginners@perl.org > Subject: Re: Grep uniqueness issue > > On Jul 29, [EMAIL PROTECTED] said: > > > I am having an odd problem using grep to ensure an array only contains > > distinct entries. > >

Re: Grep uniqueness issue

2005-07-29 Thread Jeff 'japhy' Pinyan
On Jul 29, [EMAIL PROTECTED] said: I am having an odd problem using grep to ensure an array only contains distinct entries. You should probably use a hash (along with your array, if you need to keep the order they're in) to ensure unique-ness. support01-FastEthernet1/0 support01-RH jnorman

Re: Re: Grep uniqueness issue

2005-07-29 Thread jason_normandin
Unfortunately I cannot as this is a cross-platform implementation. I need to avoid using any OS dependant commands. > > From: Eric Walker <[EMAIL PROTECTED]> > Date: 2005/07/29 Fri AM 11:19:16 EDT > To: beginners@perl.org > CC: [EMAIL PROTECTED] > Subject: Re: Grep uniqu

Re: Grep uniqueness issue

2005-07-29 Thread Eric Walker
can you use the uniq command? On Friday 29 July 2005 09:03 am, [EMAIL PROTECTED] wrote: > Hey Guys > > I am having an odd problem using grep to ensure an array only contains > distinct entries. > > I have a list similar to the following in a file (short example of a much > longer list) > > support

Grep uniqueness issue

2005-07-29 Thread jason_normandin
Hey Guys I am having an odd problem using grep to ensure an array only contains distinct entries. I have a list similar to the following in a file (short example of a much longer list) support01-FastEthernet1/0 support01-RH jnormandin-p370-1691-SH-Cpu-2 jnormandin-p370-1691-SH These entries m