GNU bug report logs -
#20954
wc - linux
Previous Next
Reported by: tele <swojskichlopak <at> wp.pl>
Date: Thu, 2 Jul 2015 00:46:03 UTC
Severity: normal
Tags: notabug
Done: Bob Proulx <bob <at> proulx.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
tag 20954 + notabug
close 20954
thanks
Maybe we did not understand.
I don't want change old definitions but create new option for wc or echo,
because this above examples not make logic sense,
( and it I want fix, however with sed is also fixed )
however now Iunderstand that they work correctly in accordance with
accepted principles.
# What is a text line? A text line by definition ends with a newline.
This has been standardized to prevent
# different implementations from implementing it differently and
creating portability problems. Therefore
# all standards compliant implementations must implement it in the same
way to prevent portability
# problems.
" wc -l " in most examples working correct,
because it " echo " give's " \n " and "wc -l" count correct.
I mentioned about "wc", because for me build option "wc -a" for "echo"
or "echo -m"
this is not important.
Maybe exist hope for example create option "m" to echo , " echo -m "
which not will from new line, but first line if variable is empty
and from new line if is not empty ?
example:
echo -m "" | wc -l
0
echo -m "e" | wc -l
1
[Message part 2 (text/html, inline)]
This bug report was last modified 9 years and 327 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.