Line | |
---|
1 | .TH ECHO 1
|
---|
2 | .SH NAME \" Copyright (C) 1989 by Kenneth Almquist.
|
---|
3 | echo \- produce message in a shell script
|
---|
4 | .SH SYNOPSIS
|
---|
5 | .B echo
|
---|
6 | [
|
---|
7 | .B -n
|
---|
8 | |
|
---|
9 | .B -e
|
---|
10 | ]
|
---|
11 | .I args...
|
---|
12 | .SH DESCRIPTION
|
---|
13 | .I Echo
|
---|
14 | prints its arguments on the standard output, separated by spaces.
|
---|
15 | Unless the
|
---|
16 | .B -n
|
---|
17 | option is present, a newline is output following the arguments.
|
---|
18 | The
|
---|
19 | .B -e
|
---|
20 | option causes
|
---|
21 | .I echo
|
---|
22 | to treat the escape sequences specially, as described in the following
|
---|
23 | paragraph.
|
---|
24 | Only one of the options
|
---|
25 | .B -n
|
---|
26 | and
|
---|
27 | .B -e
|
---|
28 | may be given.
|
---|
29 | .PP
|
---|
30 | If any of the following sequences of characters is encountered during
|
---|
31 | output, the sequence is not output. Instead, the specified action is
|
---|
32 | performed:
|
---|
33 | .de i
|
---|
34 | .IP "\\fB\\$1\\fR" 5
|
---|
35 | ..
|
---|
36 | .i \eb
|
---|
37 | A backspace character is output.
|
---|
38 | .i \ec
|
---|
39 | Subsequent output is suppressed. This is normally used at the end of the
|
---|
40 | last argument to suppress the trailing newline that
|
---|
41 | .I echo
|
---|
42 | would otherwise output.
|
---|
43 | .i \ef
|
---|
44 | Output a form feed.
|
---|
45 | .i \en
|
---|
46 | Output a newline character.
|
---|
47 | .i \er
|
---|
48 | Output a carriage return.
|
---|
49 | .i \et
|
---|
50 | Output a (horizontal) tab character.
|
---|
51 | .i \ev
|
---|
52 | Output a vertical tab.
|
---|
53 | .i \e0\fIdigits\fR
|
---|
54 | Output the character whose value is given by zero to three digits.
|
---|
55 | If there are zero digits, a nul character is output.
|
---|
56 | .i \e\e
|
---|
57 | Output a backslash.
|
---|
58 | .SH HINTS
|
---|
59 | Remember that backslash is special to the shell and needs to be escaped.
|
---|
60 | To output a message to standard error, say
|
---|
61 | .sp
|
---|
62 | .ti +1i
|
---|
63 | echo message >&2
|
---|
64 | .SH BUGS
|
---|
65 | The octal character escape mechanism (\e0\fIdigits\fR) differs from the
|
---|
66 | C language mechanism.
|
---|
67 | .SH AUTHOR
|
---|
68 | Kenneth Almquist.
|
---|
Note:
See
TracBrowser
for help on using the repository browser.