I recently noticed that the examples in the softraid man page

 http://www.openbsd.org/cgi-bin/man.cgi?query=softraid

contain many lines such as

 echo "d a\na\n\n\n\nRAID\nw\nq\n" | disklabel -E wd1

Of course, not every version of echo interprets "\n" as a newline.  In
fact, /bin/echo treats "\n" as a literal backslash followed by a literal
n.  The version of echo that is built into csh also interprets it as a
literal backslash followed by a literal n.  But the softraid man page
certainly intends it to be interpreted as a newline.

So, is the man page in error?  Or are the examples in man pages only
intended for use in the default shell?  (Note that ksh is the default
shell, and ksh has a built-in echo command that interprets "\n" as a
newline.)

Reply via email to