[PLUTO-help] Re: awk

Gian Uberto Lauri GianUberto.Lauri a eng.it
Ven 1 Dic 2006 15:23:21 CET


>>>>> "AB" == Andrea Bencini <andrea.bencini a tin.it> writes:

AB> Ho trovato (mi hannodato) queste soluzioni che funzionano
AB> ACC_INFO=`awk /$RIC/' { print $3 }' /etc/passwd` 
AB> ACC_INFO=`awk '/'$RIC'/ { print $3 }' /etc/passwd` 
AB> ACC_INFO=$(awk "/$RIC/ {print \$3 }" /etc/passwd)

L'unica che funziona con gawk è la  terza. Le prime due temo che tu le
abbia  copiate male,  perché che  ricordi io  il pattern  di selezione
della riga è all'interno delle istruzioni awk, non prima.

NAME
       gawk - pattern scanning and processing language

SYNOPSIS
       gawk [ POSIX or GNU style options ] -f program-file [ -- ] file ...
       gawk [ POSIX or GNU style options ] [ -- ] program-text file ...

       pgawk [ POSIX or GNU style options ] -f program-file [ -- ] file ...
       pgawk [ POSIX or GNU style options ] [ -- ] program-text file ...

DESCRIPTION
       Gawk  is  the  GNU Project's implementation of the AWK programming lan-
       guage.  It conforms to the definition of  the  language  in  the  POSIX
       1003.2  Command  Language And Utilities Standard.  This version in turn
       is based on the description in The AWK Programming  Language,  by  Aho,
       Kernighan,  and  Weinberger,  with the additional features found in the
       System V Release 4 version of UNIX awk.  Gawk also provides more recent
       Bell  Laboratories  awk extensions, and a number of GNU-specific exten-
       sions.

-- 
 /\           ___
/___/\_|_|\_|__|___Gian Uberto Lauri_____
  //--\| | \|  |   Integralista GNUslamico
\/                 e coltivatore diretto di Software



More information about the pluto-help mailing list