[rancid] Unable to figure out "end of run not found"

Jean Benoit jean at unistra.fr
Mon Jun 17 21:27:03 UTC 2019

On Mon, Jun 17, 2019 at 09:05:13PM +0000, Piegorsch, Weylin William wrote:
> I actually don't use the semicolon.
> Not sure if this is bash specific, sh specific, or posix general, but
> without the semicolon it sets the global environment variable only for the
> duration of that command following the variable definition, and unset it
> upon returning control to the cli. See also your "export" comment, which
> has correlating implications regarding environment vs namespace vs scope.
> But I'm not an experienced programmer, and don't pretend to grok the
> various nuances, benefits, and pitfalls known by those who actually know
> what they're doing, so if using the semicolon is better I all ears.

You are right: ; is not necessary.

NOPIPE=yes rancid -d -t type devicename

is is a perfectly valid syntax according to POSIX Shell Grammar Rules.
It works with bash, dash, ksh, zsh and other shells.

see "simple_command" syntax and rule 7, which defines "ASSIGNMENT_WORD".

simple_command   : cmd_prefix cmd_word cmd_suffix
                 | cmd_prefix cmd_word
                 | cmd_prefix
                 | cmd_name cmd_suffix
                 | cmd_name

cmd_prefix       :            io_redirect
                 | cmd_prefix io_redirect
                 |            ASSIGNMENT_WORD
                 | cmd_prefix ASSIGNMENT_WORD

You don't need the ; and you dont need export, and you can even put
redirects, as long as assignments are before the command.
Example :
XYZ=foo </tmp/x >/tmp/y A=1 B=bar mycommand myarg


More information about the Rancid-discuss mailing list