Hi Mark,

        That's great! Even I tried other thing (which worked, but to
complicate).

Thank you very much.

On Mon, 17 Dec 2001, Mark Belanger wrote:

> Alan Wilter Sousa da Silva wrote:
> >
> > Hi List,
> >         I'm a newbie about awk.
> >
> >         I'm trying to print only chosen column.  I have a file with
> > different number fields (NF), but the first 5 are equal, so I want to
> > delete them.  I'm looking for something which allow me to print the
> > interval fields $6 to $NF, included, where $NF is different for each line.
> > My biggest $NF is 23 and the smallest is 6.
> >         All allternatives that I tryed (following gawk-doc) gave blank
> > spaces before or after each line.
>
> Try this:
>
> # ps axu > /tmp/ps.out
> # awk '{ for (i=6; i<NF;++i) printf "%-10s",$i; printf "\n"}'
> /tmp/ps.out
>
> -Mark
>
> >
> > Many thanks in advance.
> >
> > --
> > -----------------------
> > Alan Wilter S. da Silva
> > -----------------------
> >  Laborat�rio de F�sica Biol�gica
> >   Instituto de Biof�sica Carlos Chagas Filho
> >    Universidade do Brasil/UFRJ
> >     Rio de Janeiro, Brasil
> >
> >   ------------------------------------------------------------------------
> > Want to buy your Pack or Services from MandrakeSoft?
> > Go to http://www.mandrakestore.com
>
>

-- 
-----------------------
Alan Wilter S. da Silva
-----------------------
 Laborat�rio de F�sica Biol�gica
  Instituto de Biof�sica Carlos Chagas Filho
   Universidade do Brasil/UFRJ
    Rio de Janeiro, Brasil


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to