NetBSD Problem Report #15997
Received: (qmail 6521 invoked from network); 21 Mar 2002 21:16:10 -0000
Message-Id: <12388-1016745371@rainier.reedmedia.net>
Date: Thu, 21 Mar 2002 13:16:11 -0800
From: reed@reedmedia.net
Reply-To: reed@reedmedia.net
To: gnats-bugs@gnats.netbsd.org
Subject: grouping example in sh manual broken?
X-Send-Pr-Version: 3.95
>Number: 15997
>Category: bin
>Synopsis: h manual has grouping example that doesn't work
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Mar 21 21:17:00 +0000 2002
>Closed-Date: Thu May 01 08:23:39 +0000 2003
>Last-Modified: Wed May 13 13:26:45 +0000 2015
>Originator:
>Release: NetBSD 1.5.3_ALPHA
>Organization:
http://bsd.reedmedia.net/
>Environment:
System: NetBSD rainier.reedmedia.net 1.5.3_ALPHA NetBSD 1.5.3_ALPHA (JCR-1.5-20020213) #9: Wed Mar 6 23:53:13 PST 2002 reed@rainier.reedmedia.net:/usr/src/sys/arch/i386/compile/JCR-1.5-20020213 i386
Architecture: i386
Machine: i386
>Description:
The grouping example
{ echo -n " hello " ; echo " world" } > greeting
doesn't seem to work from prompt or in sh script.
The shell doesn't see the closing brace.
Syntax error: end of file unexpected (expecting "}")
This issue is with 1.4.2 and 1.5.3_ALPHA.
>How-To-Repeat:
>Fix:
I assume shell is broken and man page is correct.
>Release-Note:
>Audit-Trail:
From: woods@weird.com (Greg A. Woods)
To: reed@reedmedia.net
Cc: gnats-bugs@gnats.netbsd.org (NetBSD GNATS submissions and followups),
netbsd-bugs@NetBSD.ORG (NetBSD Bugs and PR posting List)
Subject: Re: bin/15997: grouping example in sh manual broken?
Date: Thu, 21 Mar 2002 17:23:48 -0500 (EST)
[ On Thursday, March 21, 2002 at 13:16:11 (-0800), reed@reedmedia.net wrote: ]
> Subject: bin/15997: grouping example in sh manual broken?
>
> The grouping example
>
> { echo -n " hello " ; echo " world" } > greeting
>
> doesn't seem to work from prompt or in sh script.
>
> The shell doesn't see the closing brace.
>
> Syntax error: end of file unexpected (expecting "}")
>
> >Fix:
>
> I assume shell is broken and man page is correct.
Nope -- the shell is correct.
A correct example (with only the necessary whitespace) would be:
{ echo -n " hello ";echo " world";}>greeting
From SuSv2:
Grouping Commands
The format for grouping commands is as follows:
(compound-list)
Execute compound-list in a subshell environment; see
Shell Execution Environment. Variable assignments and
built-in commands that affect the environment will not
remain in effect after the list finishes.
{ compound-list;}
Execute compound-list in the current process environment.
The semicolon shown here is an example of a control
operator delimiting the "}" reserved word. Other
delimiters are possible, as shown in Shell Grammar; a
newline character is frequently used.
--
Greg A. Woods
+1 416 218-0098; <gwoods@acm.org>; <g.a.woods@ieee.org>; <woods@robohack.ca>
Planix, Inc. <woods@planix.com>; VE3TCP; Secrets of the Weird <woods@weird.com>
From: christos@zoulas.com (Christos Zoulas)
To: reed@reedmedia.net, gnats-admin@netbsd.org,
gnats-bugs@gnats.netbsd.org
Cc:
Subject: Re: bin/15997: grouping example in sh manual broken?
Date: Thu, 21 Mar 2002 18:14:46 -0500
On Mar 21, 1:16pm, reed@reedmedia.net (reed@reedmedia.net) wrote:
-- Subject: bin/15997: grouping example in sh manual broken?
|
| >Number: 15997
| >Category: bin
| >Synopsis: h manual has grouping example that doesn't work
| >Confidential: no
| >Severity: non-critical
| >Priority: low
| >Responsible: bin-bug-people
| >State: open
| >Class: sw-bug
| >Submitter-Id: net
| >Arrival-Date: Thu Mar 21 13:17:00 PST 2002
| >Closed-Date:
| >Last-Modified:
| >Originator:
| >Release: NetBSD 1.5.3_ALPHA
| >Organization:
| http://bsd.reedmedia.net/
| >Environment:
|
|
| System: NetBSD rainier.reedmedia.net 1.5.3_ALPHA NetBSD 1.5.3_ALPHA (JCR-1.5-20020213) #9: Wed Mar 6 23:53:13 PST 2002 reed@rainier.reedmedia.net:/usr/src/sys/arch/i386/compile/JCR-1.5-20020213 i386
| Architecture: i386
| Machine: i386
| >Description:
| The grouping example
|
| { echo -n " hello " ; echo " world" } > greeting
|
| doesn't seem to work from prompt or in sh script.
|
| The shell doesn't see the closing brace.
|
| Syntax error: end of file unexpected (expecting "}")
|
| This issue is with 1.4.2 and 1.5.3_ALPHA.
| >How-To-Repeat:
| >Fix:
| I assume shell is broken and man page is correct.
man page is wrong, it should read [I think]:
{ echo -n " hello " ; echo " world"; } > greeting
christos
State-Changed-From-To: open->closed
State-Changed-By: gmcgarry
State-Changed-When: Thu May 1 08:23:15 UTC 2003
State-Changed-Why:
someone fixed the manpage example.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.