Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
Message from discussion read -t und read -n1 in POSIX
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Christian Weisgerber  
View profile   Translate to Translated (View Original)
 More options Feb 10 2009, 9:13 am
Newsgroups: de.comp.os.unix.shell
From: na...@mips.inka.de (Christian Weisgerber)
Date: Tue, 10 Feb 2009 14:13:04 +0000 (UTC)
Local: Tues, Feb 10 2009 9:13 am
Subject: Re: read -t und read -n1 in POSIX
Martin Vaeth  <va...@mathematik.uni-wuerzburg.de> wrote:

> Kann man in POSIX' Shell wirklich kein read -t emulieren?
> Mit read -n1 sieht es wohl noch viel schlimmer aus...

Letzteres macht man traditionell so:

STTY=`stty -g`
stty -icanon
INP=`dd count=1 bs=1 2>/dev/null`
stty $STTY

Mit "stty min 0 time <timeout>" kann man auch einen Timeout setzen.

--
Christian "naddy" Weisgerber                          na...@mips.inka.de


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.