summaryrefslogtreecommitdiff
path: root/usr/src/man/man1b/echo.1b
diff options
context:
space:
mode:
authorRichard Lowe <richlowe@richlowe.net>2011-03-14 14:05:30 -0400
committerRichard Lowe <richlowe@richlowe.net>2011-03-14 14:05:30 -0400
commitc10c16dec587a0662068f6e2991c29ed3a9db943 (patch)
treef414286f4bba41d75683ed4fbbaa6bfa4bf7fabd /usr/src/man/man1b/echo.1b
parent68caef18a23a498d9e3017b983562c0f4fd8ab23 (diff)
downloadillumos-joyent-c10c16dec587a0662068f6e2991c29ed3a9db943.tar.gz
243 system manual pages should live with the software
Reviewed by: garrett@nexenta.com Reviewed by: gwr@nexenta.com Reviewed by: trisk@opensolaris.org Approved by: gwr@nexenta.com --HG-- extra : rebase_source : 0c599d0bec0dc8865fbba67721a7a6cd6b1feefb
Diffstat (limited to 'usr/src/man/man1b/echo.1b')
-rw-r--r--usr/src/man/man1b/echo.1b92
1 files changed, 92 insertions, 0 deletions
diff --git a/usr/src/man/man1b/echo.1b b/usr/src/man/man1b/echo.1b
new file mode 100644
index 0000000000..a388d850af
--- /dev/null
+++ b/usr/src/man/man1b/echo.1b
@@ -0,0 +1,92 @@
+'\" te
+.\" Copyright (c) 1988 Sun Microsystems, Inc - All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH echo 1B "3 Aug 1994" "SunOS 5.11" "SunOS/BSD Compatibility Package Commands"
+.SH NAME
+echo \- echo arguments to standard output
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/ucb/echo\fR [\fB-n\fR] [\fIargument\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBecho\fR writes its arguments, separated by \fIBLANK\fRs and terminated by a
+\fINEWLINE\fR, to the standard output.
+.sp
+.LP
+\fBecho\fR is useful for producing diagnostics in command files and for sending
+known data into a pipe, and for displaying the contents of environment
+variables.
+.sp
+.LP
+For example, you can use \fBecho\fR to determine how many subdirectories below
+the root directory (\fB/\fR) is your current directory, as follows:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+echo your current-working-directory's full pathname
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+pipe the output through \fBtr\fR to translate the path's embedded
+slash-characters into space-characters
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+pipe that output through \fBwc\fR \fB-w\fR for a count of the names in your
+path.
+.sp
+.in +2
+.nf
+example% \fB/usr/bin/echo "echo $PWD | tr '/' ' ' | wc -w"\fR
+.fi
+.in -2
+.sp
+
+.RE
+.sp
+.LP
+See \fBtr\fR(1) and \fBwc\fR(1) for their functionality.
+.sp
+.LP
+The shells \fBcsh\fR(1), \fBksh\fR(1), and \fBsh\fR(1), each have an \fBecho\fR
+built-in command, which, by default, will have precedence, and will be invoked
+if the user calls \fBecho\fR without a full pathname. \fB/usr/ucb/echo\fR and
+\fBcsh\fR's \fBecho()\fR have an \fB-n\fR option, but do not understand
+back-slashed escape characters. \fBsh\fR's \fBecho()\fR, \fBksh\fR's
+\fBecho()\fR, and \fB/usr/bin/echo\fR, on the other hand, understand the
+black-slashed escape characters, and \fBksh\fR's \fBecho()\fR also understands
+\fB\ea\fR as the audible bell character; however, these commands do not have an
+\fB-n\fR option.
+.SH OPTIONS
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.RS 6n
+.rt
+Do not add the \fINEWLINE\fR to the output.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBcsh\fR(1), \fBecho\fR(1), \fBksh\fR(1), \fBsh\fR(1), \fBtr\fR(1),
+\fBwc\fR(1), \fBattributes\fR(5)
+.SH NOTES
+.sp
+.LP
+The \fB-n\fR option is a transition aid for \fBBSD\fR applications, and may not
+be supported in future releases.