1echo(1B)           SunOS/BSD Compatibility Package Commands           echo(1B)
2
3
4

NAME

6       echo - echo arguments to standard output
7

SYNOPSIS

9       /usr/ucb/echo [-n] [argument]
10
11

DESCRIPTION

13       echo writes its arguments, separated by BLANKs and terminated by a NEW‐
14       LINE, to the standard output.
15
16
17       echo is useful for producing diagnostics in command files and for send‐
18       ing known data into a pipe, and for displaying the contents of environ‐
19       ment variables.
20
21
22       For example, you can use echo  to  determine  how  many  subdirectories
23       below the root directory (/) is your current directory, as follows:
24
25           o      echo your current-working-directory's full pathname
26
27           o      pipe  the output through tr to translate the path's embedded
28                  slash-characters into space-characters
29
30           o      pipe that output through wc -w for a count of the  names  in
31                  your path.
32
33                    example% /usr/bin/echo "echo $PWD | tr '/' ' ' | wc -w"
34
35
36
37
38       See tr(1) and wc(1) for their functionality.
39
40
41       The  shells  csh(1), ksh(1), and sh(1), each have an echo built-in com‐
42       mand, which, by default, will have precedence, and will be  invoked  if
43       the  user  calls  echo without a full pathname. /usr/ucb/echo and csh's
44       echo() have an -n option, but do  not  understand  back-slashed  escape
45       characters.  sh's echo(), ksh's echo(), and /usr/bin/echo, on the other
46       hand, understand the black-slashed escape characters, and ksh's  echo()
47       also  understands \a as the audible bell character; however, these com‐
48       mands do not have an -n option.
49

OPTIONS

51       -n    Do not add the NEWLINE to the output.
52
53

ATTRIBUTES

55       See attributes(5) for descriptions of the following attributes:
56
57
58
59
60       ┌─────────────────────────────┬─────────────────────────────┐
61       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
62       ├─────────────────────────────┼─────────────────────────────┤
63       │Availability                 │SUNWscpu                     │
64       └─────────────────────────────┴─────────────────────────────┘
65

SEE ALSO

67       csh(1), echo(1), ksh(1), sh(1), tr(1), wc(1), attributes(5)
68

NOTES

70       The -n option is a transition aid for BSD applications, and may not  be
71       supported in future  releases.
72
73
74
75SunOS 5.11                        3 Aug 1994                          echo(1B)
Impressum