诗酒趁年华

You'll Never Walk Alone.

BASH SHELL下的getc()函数

#!/bin/bash
function getc()
{
oldstty=`stty -g`
stty raw -echo
eval $1=`dd bs=5 count=1 2>/dev/null`
stty $oldstty
}
getc char
echo “Your input is $char”

posted by Fan Bai @ 17:07,

0 Comments:

Post a Comment

<< Home


Web This Blog

Author

Archives

Previous Posts

Links

Thanks to

Powered by Blogger
make money online blogger templates