非缓存 重定向到文件(未验证,仅作标记)

http://bbs.chinaunix.net/thread-1500656-1-1.html


unbuffer ./prog >logfile &


[waker@proxy ~]$ cat $(which unbuffer)
#!/bin/sh
# \
exec expect -- "$0" ${1+"$@"}
# Description: unbuffer stdout of a program
# Author: Don Libes, NIST


if {[string compare [lindex $argv 0] "-p"] == 0} {
    # pipeline
    set stty_init "-echo"
    eval spawn -noecho [lrange $argv 1 end]
    interact
} else {
    set stty_init "-opost"
    eval spawn -noecho $argv
    set timeout -1
    expect
}

你可能感兴趣的:(String)