-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
git-effort: replace "wc | cut" with "wc | awk" #370
Conversation
It looks "cut" may have different behaviour, e.g. BSD one works the way git-effort doesn't expect. "awk" looks to be one of possible fixes here.
A little example to give an idea:
|
I've checked the same with GNU coreutils:
So, "wc" looks to be "the one", i.e. behavior diff between GNU & BSD ones. |
Finally, |
Perhaps we could consider using stdin, it produce consistent result across GNU and BSD, and it does not depend on $ wc -l < bin/git-effort
145 |
Let's merge this rather than fixing |
@hemanth: yep, there's nothing to do with "wc" itself, it differs from system to system. |
git-effort: replace "wc | cut" with "wc | awk"
Thanks @phigoro 👍 |
git-effort: replace "wc | cut" with "wc | awk"
It looks "cut" may have different behaviour, e.g. BSD one works the way
git-effort doesn't expect. "awk" looks to be one of possible fixes here.