| Markus Mayer 2007-10-24, 7:18 pm |
| Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: news.uni-berlin.de 5Ho58sgpr8ZCxXxn/PmDBwrNO4qeUVr/eLeBwylJqZzAXJgcMqiaz9
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.6) Gecko/20070728 Thunderbird/2.0.0.6 Mnenhy/0.7.5.0
In-Reply-To: <slrnfhtuih.5da.stephane.chazelas@spam.is.invalid>
Bytes: 2461
Xref: number1.nntp.dca.giganews.com comp.unix.programmer:181576
Am 24.10.2007 09:52 postulierte Stephane CHAZELAS folgendes:
> 2007-10-24, 03:37(-04), Chris F.A. Johnson:
> [...]
>
> Note that read -d is zsh/bash/ksh93 specific (and you need
> recent versions). With ksh93 (at least the ksh93s+ I have access
> to), it doesn't work, it does seem to disable the cooked mode like
> the other shells, but you still need to enter a newline
> character (via <Ctrl-J>!), for read to return.
>
> Portably, you can use dd, either by reading one character at a
> time until you find "R" or using the terminal timeout as in my
> suggestion.
>
> Also, the local echo might already be disabled before the call
> to _curpos, so you may want to not do a stty echo afterwards but
> instead to save the settings and restore them afterwards.
>
> In zsh:
>
> STTY=-echo read -dR $'_CURPOS?\e[6n'
>
>
How would I do this programmatically? (I have to say that I'm absolutely
new to *nix programming and shell usage)
Markus
|