This is a discussion on Sending a down arrow key through ksh within the AIX Operating System forums, part of the Unix Operating Systems category; --> All, I have a KSH script which needs to navigate a menu automagically. Right now it does something like: ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| All, I have a KSH script which needs to navigate a menu automagically. Right now it does something like: echo "Y\nY\n..." | myprog > /logs/my.log The Y {enter} Y {enter} is answering prompts correctly in myprog, but right after that I am presented with a menu which I need to navigate using the arrow keys. This means sending a {down} {down}\n and then also sending the F10 key. Is there a way to echo arrow and function keys via a ksh script? |
| |||
| Pete пишет: > All, > > I have a KSH script which needs to navigate a menu automagically. > Right now it does something like: > > echo "Y\nY\n..." | myprog > /logs/my.log > > The Y {enter} Y {enter} is answering prompts correctly in myprog, but > right after that I am presented with a menu which I need to navigate > using the arrow keys. This means sending a {down} {down}\n and then > also sending the F10 key. > > Is there a way to echo arrow and function keys via a ksh script? > A simple way for using arrow keys that `cat`. up - ^[[A down - ^[[B left - ^[[D right - ^[[C You can add this command symbols on vi/vim with pressing "Ctrl+V" and "[" and litera from [A-D]. -- UV-RIPE |
| |||
| On Oct 12, 11:00*pm, Vladimir Usenko <mc2_...@radiocom.net.ua> wrote: > Pete пишет:> All, > > > I have a KSH script which needs to navigate a menu automagically. > > Right now it does something like: > > > echo "Y\nY\n..." | myprog > /logs/my.log > > > The Y {enter} Y {enter} is answering prompts correctly in myprog, but > > right after that I am presented with a menu which I need to navigate > > using the arrow keys. *This means sending a {down} {down}\n and then > > also sending the F10 key. > > > Is there a way to echo arrow and function keys via a ksh script? > > * A simple way for using arrow keys that `cat`. > up - ^[[A down - ^[[B left - ^[[D right - ^[[C > You can add this command symbols on vi/vim with pressing "Ctrl+V" and > "[" and litera from [A-D]. > > -- > UV-RIPE Hmmm..... I've tried this both with the echo tactic described above and by using redirection like so: myprog <<EOF dosomething domorethings ^[[B ^[[B ^[[21~ EOF So that's "do something", "do some more things", "down", "down", "F10" - but this it's just stopping after doing the second thing. No downs, no F10. Are there any other variables I need to set-up in order for redirection like this to acknowledge the escape sequence? |
| ||||
| "Pete" <peter.charbonnier@gmail.com> wrote in message news:345549b5-6248-4a37-953f-8bba5e1711f4@c36g2000prc.googlegroups.com... >So that's "do something", "do some more things", "down", "down", "F10" >- but this it's just stopping after doing the second thing. No downs, >no F10. Are there any other variables I need to set-up in order for >redirection like this to acknowledge the escape sequence? If you get nowhere, try "expect" - works quite well once you've learned how to drive it. cheers, clive |
| Thread Tools | |
| Display Modes | |
|
|
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Control-C and up-arrow? | Barry Burd | OpenSSH | 1 | 10-06-2008 05:10 PM |
| Down/Up Arrow in DOS window | Krunoslav Malovic | Tight VNC | 0 | 10-06-2008 09:16 AM |
| Sending META key (was Re: Sending Option Key to OSX Server fromWin32 Client) | Jonathan Gillaspie | VNC | 1 | 10-06-2008 07:07 AM |
| Re: One distributor is re-sending transactions another stops sending altogether. | Walt | SQL Server | 0 | 02-28-2008 06:05 PM |
| One distributor is re-sending transactions another stops sending altogether. | Walt | SQL Server | 0 | 02-28-2008 06:04 PM |