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

Re: [OT] Bash & fonction



frederic massot a écrit :
> Igor Genibel wrote:
> > 
> > On Fri, Sep 14, 2001 at 02:40:05PM +0200, frederic massot wrote:
> > 
> > Salut,
> > 
> > > #!/bin/sh
> > >
> > > function extract()
> > > {
> > >   /usr/bin/awk '
> > >
> > >   BEGIN { RS = "\n"; FS = " " }
> > >
> > >   {
> > >     if($11 ~ /\?/ && $11 !~ "http://www.juliana-multimedia.com";)
> > >     {
> > >       gsub("\"","")
> > >       printf("%s]\t%s %s\t%s\n",$4,$6,$7,$11)
> > >     }
> > >   }
> > >   ' ;
> >      $1 entre le ' et le ; ;)
> 
> J'ai deja essaye, ca fonctionne pour la ligne "else extract $1", mais
> pas pour la ligne "then gunzip $1 | extract".
> Dans ce dernier cas c'est le fichier non "dezipe" qui est transmis.

Peut-être en ajoutant "-c" à gunzip ?

-c --stdout --to-stdout
    Write output  on  standard  output;


-- 
Charles



Reply to: