Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102720912
D43493.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
971 B
Referenced Files
None
Subscribers
None
D43493.diff
View Options
diff --git a/bin/echo/echo.1 b/bin/echo/echo.1
--- a/bin/echo/echo.1
+++ b/bin/echo/echo.1
@@ -89,6 +89,24 @@
manual page.
.Sh EXIT STATUS
.Ex -std
+.Sh EXAMPLES
+Special treatment of options and backslashes:
+.Bd -literal -offset indent
+$ /bin/echo "-hello\\tworld"
+-hello\tworld
+.Ed
+.Pp
+Avoid new line character:
+.Bd -literal -offset indent
+$ /bin/echo -n hello;/bin/echo world
+helloworld
+.Ed
+.Pp
+Or to achieve the same result:
+.Bd -literal -offset indent
+$ /bin/echo "hello\\c";/bin/echo world
+helloworld
+.Ed
.Sh SEE ALSO
.Xr builtin 1 ,
.Xr csh 1 ,
@@ -105,3 +123,14 @@
.Nm
command appeared in
.At v2 .
+.Sh CAVEATS
+The
+.Nm
+command behaves differently with regards to the built-in
+.Nm
+shell command in a number of ways including escaped characters handling.
+It also differs in behavior between different systems hence complicating writing
+portable scripts.
+It is advised to use the
+.Xr printf 1
+command to avoid these shortcomings.
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 17, 8:26 AM (21 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14673239
Default Alt Text
D43493.diff (971 B)
Attached To
Mode
D43493: echo(1): Add EXAMPLES
Attached
Detach File
Event Timeline
Log In to Comment