about summary refs log tree commit diff
path: root/necho.1
blob: b1bde4314dc63a3448ef640f58f2600081a9812c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
.Dd October 19, 2017
.Dt NECHO 1
.Os
.Sh NAME
.Nm necho ,
.Nm zecho ,
.Nm qecho ,
.Nm jecho ,
.Nm secho
.Nd minimal, sensible alternatives to echo(1)
.Sh SYNOPSIS
.Nm necho
.Op Ar string\ ...
.Nm zecho
.Op Ar string\ ...
.Nm qecho
.Op Ar string\ ...
.Nm jecho
.Op Ar string\ ...
.Nm secho
.Op Ar string\ ...
.Sh DESCRIPTION
The
.Nm necho
utility writes its arguments, one per line, to standard output.
.Pp
The
.Nm zecho
utility writes its arguments, terminated by NUL bytes, to standard output.
.Pp
The
.Nm qecho
utility writes its arguments, surrounded by unicode quotation marks, to standard output.
.Pp
The
.Nm jecho
utility writes its arguments joined together with no separators
to standard output.
.Pp
The
.Nm secho
utility writes its arguments, separated by spaces, to standard output,
followed by a <newline>.
If there are no arguments, only the <newline> is written.
.Sh OPTIONS
Implementations do not support any options,
nor special handling of a
.Dq Li \&-\&-
argument.
.Sh EXIT STATUS
These utilities exit 0 on success, and >0 if an error occurs.
.Sh SEE ALSO
.Xr echo 1 ,
.Xr printf 1
.Sh STANDARDS
.Nm secho
is a POSIX-conforming, but not XSI-conforming implementation of
.Xr echo 1 .
.Sh CAVEATS
These tools use
.Xr writev 2
syscalls for efficient output.
This generally works fine,
but there is a problem with using this function when writing to
the Linux
.Xr proc 5
filesystem:
only the first buffer will be regarded as a write.
.Pp
Therefore,
.Pp
.Dl jecho 60 >/proc/sys/kernel/panic
.Pp
will work, but
.Pp
.Dl jecho 6 0 >/proc/sys/kernel/panic
.Pp
will just be regarded as a write of
.Sq Li 6 .
.Sh AUTHORS
.An Leah Neukirchen Aq Mt leah@vuxu.org
.Sh LICENSE
These utilities are in the public domain.
.Pp
To the extent possible under law,
the creator of this work
has waived all copyright and related or
neighboring rights to this work.
.Pp
.Lk http://creativecommons.org/publicdomain/zero/1.0/