From: Kevin Korb <kmk@sanitarium.net>
To: dash@vger.kernel.org
Subject: Re: [bug?] echo -n does not work as described
Date: Thu, 12 Nov 2015 11:55:27 -0500 [thread overview]
Message-ID: <5644C47F.2060008@sanitarium.net> (raw)
In-Reply-To: <5644BBDC.4000108@sanitarium.net>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
For future reference, I did some reading in Gentoo's bugzilla...
Apparently the Gentoo devs broke dash's echo -n on purpose. Their
intention is to cause any shell script that is called with /bin/sh to
fail if the script uses echo -n. However, they didn't limit this
behaviour to dash as /bin/sh as it happens as /bin/dash too and they
didn't modify the man page and they didn't break bash this way.
So, I am calling this a stupid Gentooism and I am forking their ebuild
for my own systems with that patch commented out.
On 11/12/2015 11:18 AM, Kevin Korb wrote:
> AHA! Now we are getting somewhere. I compiled dash myself and it
> behaved properly. I then tracked my problem to this Gentoo patch:
> https://gitweb.gentoo.org/repo/gentoo.git/tree/app-shells/dash/files/d
as
>
>
h-0.5.8.1-dumb-echo.patch
>
> So, apparently my problem is with Gentoo not dash. Thanks for
> helping me figure that out.
>
> On 11/12/2015 05:03 AM, Petr Šabata wrote:
>> On Wed, Nov 11, 2015 at 08:56:02PM -0500, Kevin Korb wrote:
>>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
>>>
>>> I am on dash version 0.5.8.2 on Gentoo Linux (USE=libedit
>>> -static).
>>>
>>> The echo builtin does not work as described. In the man page:
>>> echo [-n] args... Print the arguments on the standard output,
>>> separated by spaces. Unless the -n option is present, a
>>> newline is output following the arguments.
>>>
>>> However, in actual usage: % dash $ echo testing testing $ echo
>>> -n testing - -n testing $ /bin/echo -n testing testing$
>>>
>>> This is causing me problems when I attempt to switch /bin/sh
>>> from bash to dash.
>
>> Hmm, where does the 0.5.8.2 version come from, I wonder? The
>> latest release is 0.5.8 [0] and I cannot reproduce your issue
>> with it on Fedora [1] (and note that, afaik, Fedora doesn't apply
>> any special patches that could affect this behavior).
>
>> Try rebuilding dash with USE=-libedit and see if it changes
>> anything. If not -- I would bug the Gentoo maintainers.
>
>> P
>
>> [0] http://gondor.apana.org.au/~herbert/dash/ [1]
>> dash-0.5.8-3.fc23.x86_64
>
>
> -- To unsubscribe from this list: send the line "unsubscribe dash"
> in the body of a message to majordomo@vger.kernel.org More
> majordomo info at http://vger.kernel.org/majordomo-info.html
>
- --
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,
Kevin Korb Phone: (407) 252-6853
Systems Administrator Internet:
FutureQuest, Inc. Kevin@FutureQuest.net (work)
Orlando, Florida kmk@sanitarium.net (personal)
Web page: http://www.sanitarium.net/
PGP public key available on web site.
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iEYEARECAAYFAlZExH8ACgkQVKC1jlbQAQcWQACg92JXp/RNRl5Bw3qGeFzQF8hq
aXIAoK13wl6ELE9BEfFjRd1qJoWk26lC
=xFAp
-----END PGP SIGNATURE-----
prev parent reply other threads:[~2015-11-12 16:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-12 1:56 [bug?] echo -n does not work as described Kevin Korb
2015-11-12 3:14 ` Eric Blake
2015-11-12 3:40 ` Kevin Korb
2015-11-12 3:46 ` Kevin Korb
2015-11-12 8:35 ` Seb
2015-11-12 16:12 ` Kevin Korb
2015-11-12 21:24 ` Stephane Chazelas
2015-11-12 8:10 ` Bastian Bittorf
2015-11-12 16:11 ` Kevin Korb
2015-11-19 12:36 ` Bastian Bittorf
2015-11-12 10:03 ` Petr Šabata
2015-11-12 16:18 ` Kevin Korb
2015-11-12 16:55 ` Kevin Korb [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5644C47F.2060008@sanitarium.net \
--to=kmk@sanitarium.net \
--cc=dash@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox