tobold.org

correct • elegant • free

△ comp.unix.shell △

◅ How to record stdin into a file

How to "set" current arguments preserving whitespace? ▻

Question on awk

In article <7ld9k8$fj6$1@magnum.mmm.com>, Dan Mercer <damercer@mmm.com> wrote:
>I'm still trying to figure out how ":??" gets processed and
>seems to match everything.

It's parsed as:

    ((the colon character) zero or once) zero or once

The second `?' effectively has no effect: the pattern will match either
a single `:' or the empty string, just as if it were `:?'. Every string
contains the empty string.

Tim.
--
Tim Goodwin   | "You don't need to do drugs in order to
University of | think that the government's policies are
Leicester, UK | stupid and dangerous." -- David Bancroft

Original headers:

From: tjg@ltpcg.star.le.ac.uk (Tim J Goodwin)
Newsgroups: comp.unix.shell
Subject: Re: Question on awk
Date: 30 Jun 1999 16:18:10 +0100
Organization: University of Leicester, UK
Message-ID: <7ldcfi$3da$1@ltpcg.star.le.ac.uk>
References: <37778495.F391EB2C@accn.org> <7lafpf$8uo$1@magnum.mmm.com>
  <slrn7nih4r.bla.ken@pulsar.halcyon.com> <7ld9k8$fj6$1@magnum.mmm.com>

△ comp.unix.shell △

◅ How to record stdin into a file

How to "set" current arguments preserving whitespace? ▻