4 ms·
Be 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/
by chriswarbo 4y ago
Be 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...