Computing.Net > Forums > Unix > Cursor handled in korn shell.

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Cursor handled in korn shell.

Reply to Message Icon

Name: Giovanni
Date: November 26, 2003 at 04:34:25 Pacific
OS: Aix 5.1
CPU/Ram: rs/6000
Comment:

I wish to handle the cursor in korn shell when I test a choice but I want that the cursor don't go in a new line.
In this case:
print -n "Yes or No >> "
read a

if [[ etc.
read a (le cursor not in a new line)

Any help will be appreciated. Many thanks in advance.

Giovanni




Sponsored Link
Ads by Google

Response Number 1
Name: WilliamRobertson
Date: November 26, 2003 at 16:38:29 Pacific
Reply:

How about:

read a?"Yes or No >> "

though I would prompt for Y or N with:

typeset -uL1 reply_yn
read reply_yn?"Y or N? "

which simplifies the validation by making $reply_yn
one character long and uppercase.


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: Cursor handled in korn shell.

mkdir in korn shell cgi script www.computing.net/answers/unix/mkdir-in-korn-shell-cgi-script/5347.html

Read in Korn Shell www.computing.net/answers/unix/read-in-korn-shell/5141.html

escaping * in korn shell www.computing.net/answers/unix/escaping-in-korn-shell/7016.html