nv-l
[Top] [All Lists]

Re: AWK

To: nv-l@lists.tivoli.com
Subject: Re: AWK
From: FINN <vp@FOUNDATION.NET>
Date: Tue, 20 Apr 1999 10:49:27 +0200
Reply-to: petr@datasys.cz
Sender: Discussion of IBM NetView and POLYCENTER Manager on NetView <NV-L@UCSBVM.UCSB.EDU>
Alain,
use single quotes around the variable:

/usr/bin/awk '/'$var'/ { print }' file_name

HTH,
Best regards,
Vladimir.

"MENEZES, ALAIN" wrote:

> Hi all,
>
> Does anyone know how to use a variable as pattern (between '/') in an
> awk pgm; variable_name or $variable_name between '/' is read as a
> string, but I'd like awk to use the variables value.
>
> Any workaround would also be appreciated
>
> Thanks
>
> ---------------------
> Alain Menezes
> ASLK-CGER Services GIE                          Tel.:  +32 2 228.55.74
> Rue Fossé-aux-Loups, 48                               Fax.:  +32 2
> 228.83.69
> 1000  Bruxelles                                         Email:
> a.menezes@aslk-cger.be

--
------------------------------------------------------------------------------
"The lyf so short, the craft so long to lerne." Chaucer.

<Prev in Thread] Current Thread [Next in Thread>
  • AWK, MENEZES, ALAIN
    • Re: AWK, FINN <=

Archive operated by Skills 1st Ltd

See also: The NetView Web