From: steffen@sdaoden.eu (Steffen Nurpmeso)
Subject: [TUHS] basic tools / Universal Unix
Date: Thu, 19 Oct 2017 23:03:40 +0200 [thread overview]
Message-ID: <20171019210340.NLwmH%steffen@sdaoden.eu> (raw)
In-Reply-To: <1508424105.2409028.1144261928.5FC3332C@webmail.messagingengine.com>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 3098 bytes --]
Good evening everybody.
Random832 <random832 at fastmail.com> wrote:
|On Thu, Oct 19, 2017, at 10:33, Steffen Nurpmeso wrote:
|> Random832 <random832 at fastmail.com> wrote:
|>|On Wed, Oct 18, 2017, at 19:03, Doug McIlroy wrote:
|>|>> But mind you, in preparation of this email i found a bug in
|>|>> Busybox sed(1) which simply echoes nothing for the above.
|>|>
|>|> I assume that * is a typo for - . If so, sed did just what
|>|> -n tells it to--no printing except as called for by p or P.
|>|
|>|Or, you know, l (the letter ell). Which busybox sed appears to not
|>|support at all, rather than somehow misapplying -n to it.
|>
|> The letter l, yes. But it does not fail either, so it knows about
|> it, talking version 1.27.something here.
|
|If you look at the source, it is in the list that is checked for
|printing (or not) the 'unsupported command' error message, but there is
|no actual code to handle it (and when called *without* -n, it just falls
|through and prints once, just like if you'd had no command at all)
|
|https://git.busybox.net/busybox/plain/editors/sed.c?h=1_3_stable
That is true.
|I think that makes this a legitimate bug in busybox, rather than simply
|an artifact of being a minimal tool that doesn't aim for posix (or
|historical unix) conformance.
Yes, it should error out or implement the stuff i think. The way
it is is not handable.
The comments in coreutils/cat.c are postable in this thread too:
/* Rob had "cat -v" implemented as a separate applet, catv.
[That is Rob AT Landley DOT NET]
* See "cat -v considered harmful" at
* http://cm.bell-labs.com/cm/cs/doc/84/kp.ps.gz
[This server has been killed]
* From USENIX Summer Conference Proceedings, 1983
* """
* The talk reviews reasons for UNIX's popularity and shows, using UCB cat
* as a primary example, how UNIX has grown fat. cat isn't for printing
* files with line numbers, it isn't for compressing multiple blank lines,
* it's not for looking at non-printing ASCII characters, it's for
* concatenating files.
* We are reminded that ls isn't the place for code to break a single column
* into multiple ones, and that mailnews shouldn't have its own more
* processing or joke encryption code.
* """
*
* I agree with the argument. Unfortunately, this ship has sailed (1983...).
* There are dozens of Linux distros and each of them has "cat" which supports -v.
* It's unrealistic for us to "reeducate" them to use our, incompatible way
* to achieve "cat -v" effect. The actual effect would be "users pissed off
* by gratuitous incompatibility".
And, indeed sailing (-vet explicitly compiled in):
?0[steffen at essex busybox.git]$ echo −e | cat -vet
M-bM-^HM-^Re$
Then again, you know, i personally have problems with -vet and
think the POSIX sed variant is easier to grasp:
?0[steffen at essex busybox.git]$ echo −e | sed -n l
\342\210\222e$
--steffen
|
|Der Kragenbaer, The moon bear,
|der holt sich munter he cheerfully and one by one
|einen nach dem anderen runter wa.ks himself off
|(By Robert Gernhardt)
next prev parent reply other threads:[~2017-10-19 21:03 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-18 23:03 Doug McIlroy
2017-10-19 3:53 ` Random832
2017-10-19 14:33 ` Steffen Nurpmeso
2017-10-19 14:41 ` Random832
2017-10-19 21:03 ` Steffen Nurpmeso [this message]
2017-10-20 19:54 ` Steffen Nurpmeso
2017-10-19 14:32 ` Steffen Nurpmeso
-- strict thread matches above, loose matches on Subject: below --
2017-11-15 14:06 Noel Chiappa
2017-11-15 17:12 ` Ralph Corderoy
2017-11-15 17:47 ` Larry McVoy
2017-11-15 18:40 ` Bakul Shah
2017-11-15 19:58 ` Larry McVoy
2017-11-01 22:51 Norman Wilson
2017-11-01 23:09 ` Lyndon Nerenberg
2017-11-02 20:29 ` Grant Taylor
2017-10-31 19:23 Norman Wilson
2017-10-30 21:40 Noel Chiappa
2017-10-30 14:16 Noel Chiappa
2017-10-30 14:40 ` Clem Cole
2017-10-30 15:23 ` Arthur Krewat
2017-10-30 20:56 ` Dave Horsfall
2017-10-31 10:50 ` Ronald Natalie
2017-11-01 3:23 ` Dave Horsfall
2017-11-01 13:25 ` Tim Bradshaw
2017-11-16 1:17 ` Dario Niedermann
2017-11-15 1:25 ` Nemo
2017-11-15 2:10 ` Will Senn
2017-11-15 2:16 ` Larry McVoy
2017-11-15 2:37 ` Warner Losh
2017-11-15 3:07 ` Will Senn
2017-11-15 16:13 ` Arthur Krewat
2017-11-15 16:23 ` Arthur Krewat
2017-11-15 16:48 ` Clem Cole
2017-11-15 18:13 ` Bakul Shah
2017-11-15 19:01 ` Clem Cole
2017-11-15 9:58 ` Andy Kosela
2017-11-15 11:42 ` Ralph Corderoy
2017-11-01 14:05 ` Ralph Corderoy
2017-11-01 16:42 ` arnold
2017-11-01 17:17 ` Ralph Corderoy
2017-11-01 18:03 ` Dan Cross
2017-11-01 18:06 ` arnold
2017-11-01 20:16 ` Bakul Shah
2017-11-01 20:37 ` arnold
2017-11-01 21:04 ` Bakul Shah
2017-11-02 0:05 ` Chet Ramey
2017-11-02 0:10 ` Ralph Corderoy
2017-10-31 16:43 ` Don Hopkins
2017-11-02 17:48 ` Paul Winalski
2017-10-30 21:50 ` Charles Anthony
2017-10-16 17:52 Clem Cole
2017-10-16 18:54 ` Dan Cross
2017-10-17 13:51 ` Tony Finch
2017-10-17 20:22 ` Steffen Nurpmeso
2017-10-16 20:05 ` Bakul Shah
2017-10-30 0:55 ` Ralph Corderoy
2017-10-30 2:54 ` Bakul Shah
2017-10-30 14:05 ` Ralph Corderoy
2017-10-16 20:39 ` Andy Kosela
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=20171019210340.NLwmH%steffen@sdaoden.eu \
--to=steffen@sdaoden.eu \
/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;
as well as URLs for NNTP newsgroup(s).