3 ms·
Thanks, I’ve faced this issue but didn’t know about gnu fold.
by hsbauauvhabzb 4y ago
Thanks, I’ve faced this issue but didn’t know about gnu fold.
- chriswarbo 4y agoBe aware that bash doesn't like being piped, and changes some of its behaviour. I work around that using expect: - Here's the script itself https://github.com/Warbo/warbo-utilities/blob/master/raw/wrappedShell https://github.com/Warbo/warbo-utilities/blob/master/raw/wra... - Here's the accompanying expect file https://github.com/Warbo/warbo-utilities/blob/master/raw/wrappedShell.expect https://github.com/Warbo/warbo-utilities/blob/master/raw/wra... - Here's my patched version of GNU fold, which removes some buffering https://github.com/Warbo/warbo-utilities/blob/master/raw/fold.c https://github.com/Warbo/warbo-utilities/blob/master/raw/fol... - Here's the resulting Nix package (along with some tests) https://github.com/Warbo/warbo-utilities/blob/master/scripts/wrappedShell.nix https://github.com/Warbo/warbo-utilities/blob/master/scripts...