|
From: | tele |
Subject: | bug#20954: wc - linux |
Date: | Fri, 3 Jul 2015 10:49:10 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0.1 |
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 I understand that they work correctly in accordance with accepted principles. # 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 |
[Prev in Thread] | Current Thread | [Next in Thread] |