piuccio/cowsay

`cowsay -n` adds trailing newline when input is piped

dylanpyle opened this issue · 1 comments

When reading piped input, cowsay -n prints a trailing newline. This behavior doesn't exist in the original perl version:

$ # perl
$ echo 'test' | /opt/local/bin/cowsay -n  
 ______
< test >
 ------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

$ # javascript
$ echo 'test' | ~/n/bin/cowsay -n
 ______
/ test \
\      /
 ------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

interesting because it works fine if you don't use the option -n, I wonder what magic is going on. I'll look into it one day, feel free to send a PR