Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cowsay -n adds trailing newline when input is piped #28

Closed
dylanpyle opened this issue Sep 18, 2017 · 1 comment
Closed

cowsay -n adds trailing newline when input is piped #28

dylanpyle opened this issue Sep 18, 2017 · 1 comment

Comments

@dylanpyle
Copy link

dylanpyle commented Sep 18, 2017

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 |
                ||     ||
@piuccio
Copy link
Owner

piuccio commented Sep 18, 2017

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

doug2k1 added a commit to doug2k1/cowsay that referenced this issue Oct 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants