docs/167020: Bad command-line example in handbook
Taras Korenko
ds at ukrhub.net
Tue Apr 17 11:30:06 UTC 2012
The following reply was made to PR docs/167020; it has been noted by GNATS.
From: Taras Korenko <ds at ukrhub.net>
To: "Bj.rn Heidotting" <b.heidotting at yahoo.com>
Cc: bug-followup at FreeBSD.org
Subject: Re: docs/167020: Bad command-line example in handbook
Date: Tue, 17 Apr 2012 14:16:27 +0300
On Tue, Apr 17, 2012 at 10:45:08AM +0000, Björn Heidotting wrote:
>
> >Description:
> In Chapter 19.12 (Backup Basics) there is a bad command-line example. The handbooks shows the following:
>
> Example 19-2. Using dump over ssh with RSH set
> # RSH=/usr/bin/ssh /sbin/dump -0uan -f targetuser at targetmachine.example.com:/dev/sa0 /usr
>
> This won't work, because this are two commands which are not separated.
> ...
Actually, this line is correct. At least, for sh(1).
------------------------------------------------------------------------------
Simple Commands
If a simple command has been recognized, the shell performs the following
actions:
1. Leading words of the form ``name=value'' are stripped off and
assigned to the environment of the simple command. Redirection
operators and their arguments (as described below) are stripped off
and saved for processing.
-- (c) man 1 sh --------------------------------------------------------------
An example:
nx6125% /bin/sh
$ echo $VAR
$ VAR='tuesday' /bin/sh -c 'echo $VAR'
tuesday
$ echo $VAR
$
--
Best regards,
Taras Korenko
More information about the freebsd-doc
mailing list