correct • elegant • free

△ △

◅ shell expansion inside crontab

Upper and Lower case in SED?? ▻

replacing space with underscore

In article <7lgu95$4n5a$>,
John McKown <> wrote:
>I just tried this and got the same results - no translation. But the man
>page says that \ooo will use octal. A bug in tr? A bug in the doc? NO!

No, `tr' has to see the backwhacks.  Most shells use backwhacks to quote
the next character, so the command doesn't see them.

    $ echo \foo

By applying another level of quoting, the backwhack is stripped of its
special meaning, and passed to the command.

    $ echo '\foo'

You could equally well use backwhack or double quoting here.

    $ echo \\foo "\bar"
    \foo \bar

(Note that I'm assuming a non-System V echo.)

>SUCCESS! It would have been very nice for the man page to say this

The manual pages tend to assume that you know what your shell is doing,
so don't discuss quoting or globbing, for instance.  They are really
reference documentation, not tutorials.

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: (Tim J Goodwin)
Subject: Re: replacing space with underscore
Date: 2 Jul 1999 11:49:57 +0100
Organization: University of Leicester, UK
Message-ID: <7li5gl$1ke$>
References: <7lgl7c$99a$>

△ △

◅ shell expansion inside crontab

Upper and Lower case in SED?? ▻