diff options
author | Jason McIntyre <jmc@cvs.openbsd.org> | 2003-12-22 11:54:03 +0000 |
---|---|---|
committer | Jason McIntyre <jmc@cvs.openbsd.org> | 2003-12-22 11:54:03 +0000 |
commit | 46f9808a6613fd9a139db6fffc33fa4243a6cd95 (patch) | |
tree | f2f306f7abf0e03aa8b90766cfa4344dbd7d45b2 /bin/ksh | |
parent | 0e922b36d161eb9f565830e475d9957ee52a436c (diff) |
note that `&&' and `||' are left-associative;
from vax at carolina dot rr com (NetBSD PR 23814);
agreed (in principal) millert@ deraadt@
Diffstat (limited to 'bin/ksh')
-rw-r--r-- | bin/ksh/ksh.1 | 15 | ||||
-rw-r--r-- | bin/ksh/ksh.1tbl | 15 | ||||
-rw-r--r-- | bin/ksh/sh.1 | 15 | ||||
-rw-r--r-- | bin/ksh/sh.1tbl | 15 |
4 files changed, 56 insertions, 4 deletions
diff --git a/bin/ksh/ksh.1 b/bin/ksh/ksh.1 index 71c2260dd00..7f6b8d7e8e5 100644 --- a/bin/ksh/ksh.1 +++ b/bin/ksh/ksh.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: ksh.1,v 1.61 2003/12/12 22:35:07 naddy Exp $ +.\" $OpenBSD: ksh.1,v 1.62 2003/12/22 11:54:02 jmc Exp $ .\" .\" Copyright (c) 1980, 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -409,6 +409,19 @@ have equal precedence which is higher than that of and .Ql \&; , which also have equal precedence. +Note that the +.Ql && +and +.Ql || +operators are +.Qq left-associative . +For example, both of these commands will print only +.Qq bar : +.Bd -literal -offset indent +false && echo foo || echo bar +true || echo foo && echo bar +.Ed +.Pp The .Ql & token causes the preceding command to be executed asynchronously; that is, diff --git a/bin/ksh/ksh.1tbl b/bin/ksh/ksh.1tbl index 809ecec065b..947015e3911 100644 --- a/bin/ksh/ksh.1tbl +++ b/bin/ksh/ksh.1tbl @@ -1,4 +1,4 @@ -.\" $OpenBSD: ksh.1tbl,v 1.61 2003/12/12 22:35:07 naddy Exp $ +.\" $OpenBSD: ksh.1tbl,v 1.62 2003/12/22 11:54:02 jmc Exp $ .\" .\" Copyright (c) 1980, 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -409,6 +409,19 @@ have equal precedence which is higher than that of and .Ql \&; , which also have equal precedence. +Note that the +.Ql && +and +.Ql || +operators are +.Qq left-associative . +For example, both of these commands will print only +.Qq bar : +.Bd -literal -offset indent +false && echo foo || echo bar +true || echo foo && echo bar +.Ed +.Pp The .Ql & token causes the preceding command to be executed asynchronously; that is, diff --git a/bin/ksh/sh.1 b/bin/ksh/sh.1 index 5fd3f3fb888..524829d55dc 100644 --- a/bin/ksh/sh.1 +++ b/bin/ksh/sh.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: sh.1,v 1.39 2003/12/12 22:35:08 naddy Exp $ +.\" $OpenBSD: sh.1,v 1.40 2003/12/22 11:54:02 jmc Exp $ .\" .\" Copyright (c) 1980, 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -400,6 +400,19 @@ have equal precedence which is higher than that of and .Ql \&; , which also have equal precedence. +Note that the +.Ql && +and +.Ql || +operators are +.Qq left-associative . +For example, both of these commands will print only +.Qq bar : +.Bd -literal -offset indent +false && echo foo || echo bar +true || echo foo && echo bar +.Ed +.Pp The .Ql & token causes the preceding command to be executed asynchronously; that is, diff --git a/bin/ksh/sh.1tbl b/bin/ksh/sh.1tbl index 613bbbd3508..5a2d8eccb45 100644 --- a/bin/ksh/sh.1tbl +++ b/bin/ksh/sh.1tbl @@ -1,4 +1,4 @@ -.\" $OpenBSD: sh.1tbl,v 1.39 2003/12/12 22:35:08 naddy Exp $ +.\" $OpenBSD: sh.1tbl,v 1.40 2003/12/22 11:54:02 jmc Exp $ .\" .\" Copyright (c) 1980, 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -400,6 +400,19 @@ have equal precedence which is higher than that of and .Ql \&; , which also have equal precedence. +Note that the +.Ql && +and +.Ql || +operators are +.Qq left-associative . +For example, both of these commands will print only +.Qq bar : +.Bd -literal -offset indent +false && echo foo || echo bar +true || echo foo && echo bar +.Ed +.Pp The .Ql & token causes the preceding command to be executed asynchronously; that is, |