Skip to content

Instantly share code, notes, and snippets.

Last active Feb 6, 2022
What would you like to do?
poor-man's unbuffer
#! /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
exit [lindex [wait] 3]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment