bug#20954: wc - linux

2015-07-05 Thread Bob Proulx
tele wrote: > 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, What would such an option do? > ( and it I want fix, however with sed is also fixed ) Your original message asked if "echo |

bug#20954: wc - linux

2015-07-03 Thread tele
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

bug#20954: wc - linux

2015-07-02 Thread Bob Proulx
tele wrote: > "echo" gives in new line, Yes. > "echo -n" subtracts 1 line, echo -n is non-portable and shouldn't be used. echo -n suppresses emitting a trailing newline. Note that in both of these cases you are using the shell's internal builtin echo and not the coreutils echo. They behave th

bug#20954: wc - linux

2015-07-02 Thread tele
tag 20954 + notabug close 20954 thanks tele wrote: Hi! Hi! From terminal: $ a="" ; echo $s | wc -l 1 Do you mean $a instead of $s? Either way is the same though assuming $s is empty too. - Yes, my mistake :-) Should be 0 , yes ? No. Should be 1. You have forgotten about the ne

bug#20954: wc - linux

2015-07-02 Thread Stephane Chazelas
2015-07-01 19:41:00 -0600, Bob Proulx: [...] > > $ a="" ; echo $s | wc -l > > 1 [...] > No. Should be 1. You have forgotten about the newline at the end of > the command. The echo will terminate with a newline. [...] Leaving a variable unquoted will also cause the shell to apply the split+glob

bug#20954: wc - linux

2015-07-01 Thread Bob Proulx
tag 20954 + notabug close 20954 thanks tele wrote: > Hi! Hi! :-) > From terminal: > > $ a="" ; echo $s | wc -l > 1 Do you mean $a instead of $s? Either way is the same though assuming $s is empty too. > Should be 0 , yes ? No. Should be 1. You have forgotten about the newline at the end o

bug#20954: wc - linux

2015-07-01 Thread tele
Hi! From terminal: $ a="" ; echo $s | wc -l 1 Should be 0 , yes ?