summaryrefslogtreecommitdiff
path: root/bin/ksh/sh.1
diff options
context:
space:
mode:
authorJason McIntyre <jmc@cvs.openbsd.org>2003-12-22 11:54:03 +0000
committerJason McIntyre <jmc@cvs.openbsd.org>2003-12-22 11:54:03 +0000
commit46f9808a6613fd9a139db6fffc33fa4243a6cd95 (patch)
treef2f306f7abf0e03aa8b90766cfa4344dbd7d45b2 /bin/ksh/sh.1
parent0e922b36d161eb9f565830e475d9957ee52a436c (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/sh.1')
-rw-r--r--bin/ksh/sh.115
1 files changed, 14 insertions, 1 deletions
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,