gfetch icon indicating copy to clipboard operation
gfetch copied to clipboard

Leaves "\n" in concatted binary

Open jwrightecs opened this issue 4 years ago • 2 comments

$ head bin/gfe

#!/bin/sh\n# gfe: git fetch\n\n
# human.sh - convert sizes to human-readable sizes
# (c) Kiëd Llaentenn <[email protected]>
# See the COPYING file for copyright information.

human() {
    cat | awk \
    'function human(x) {
        if (x<1000) {return x} else {x/=1024}
        s="kMGTEPZY";

see https://pubs.opengroup.org/onlinepubs/9699919799/utilities/echo.html#tag_20_37_16 and maybe use printf instead

jwrightecs avatar Apr 20 '20 19:04 jwrightecs

bash 4.1.2 on RedHat 6.10

jwrightecs avatar Apr 20 '20 19:04 jwrightecs

@jwrightecs I'm unable to reproduce this, but I've changed echo to printf anyway. Can you verify that this issue is fixed on your machine?

kiedtl avatar Apr 20 '20 21:04 kiedtl