首页 > 科技 > stty -echo

stty -echo

2006年5月17日 10点53分 发表评论 阅读评论

stty,change and print terminal line settings.

stty -echo

It always use “-echo” parameter when input some characters could not seen by others, for example, password. We should echo the text for security reasons.

If the “stty -echo” command is executed, every typed characters were hidden, but the causing result displays as normal. How to dismiss this echo setting? Use a variable to keep the stty setting before echo typed character action.

# STTYSAVED=`stty -g`

-g:print all current settings in a stty-readable form

later, we could back to the former configuration for stty, # stty $STTYSAVED

every setting was recovered. We could see the typed characters again.

分类: 科技 标签:
  1. 本文目前尚无任何评论.
  1. 本文目前尚无任何 trackbacks 和 pingbacks.
您必须在 登录 后才能发布评论.