[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Re : RE [BASH] problème avec un script



On Tue, Apr 08, 2008 at 07:58:20PM +0200, Jacques L'helgoualc'h wrote:
>  { sort -u fic1; sort -u fic2; }|sort|uniq -d

Wow. J'ai une solution en 2 lignes de perl:

my %f1 = map { $_ => 1 } `cat $ARGV[0]`;
print grep { $f1{$_} } `cat $ARGV[1]`;

mais tu gagnes de loin. Élegant et court :)

Y.


Reply to: