Last active
February 6, 2022 22:14
-
-
Save dotysan/f94041e940d12f7f83dd8d88e8143a71 to your computer and use it in GitHub Desktop.
poor-man's unbuffer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env expect | |
# tell stty to postprocess output | |
set stty_init "-opost" | |
# infinite | |
set timeout -1 | |
# $argv is the command that we unbuffer | |
eval [list spawn -noecho] $argv | |
# wait here | |
expect | |
exit [lindex [wait] 3] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment