|
| From: | Clark Wang |
| Subject: | Re: echo -n |
| Date: | Mon, 6 Feb 2017 14:37:28 +0800 |
On Mon, Feb 6, 2017 at 12:15 PM, Jyoti B Tenginakai <jyoti.b.t@in.ibm.com> wrote:
Thanks you all,
Again I see that this printf we can use. But there are some scenarios where the o/p does not exactly match with echo. So still its good to have a way to pirnt -n /-e/-E with echo. Can this be considered as bug and can this be fixed?
It’s not a bug. According to POSIX.1-2008:
The
echoutility shall not recognize the"--"argument in the manner specified by Guideline 10 of XBD Section 12.2;"− −"shall be recognized as a string operand.It is not possible to use
echoportably across all POSIX systems unless both−n(as the first argument) and escape sequences are omitted.The
echoutility has not been made obsolescent because of its extremely widespread use in historical applications.
| [Prev in Thread] | Current Thread | [Next in Thread] |