- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to use "up" key to see previous issued command...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-26-2005 09:44 PM
тАО04-26-2005 09:44 PM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-26-2005 09:51 PM
тАО04-26-2005 09:51 PM
Re: How to use "up" key to see previous issued commands insted of "Esc+K"?
you can use your arrow keys,
http://hpux.cs.utah.edu/hppd/hpux/Shells/bash-3.00.14/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-26-2005 09:53 PM
тАО04-26-2005 09:53 PM
Re: How to use "up" key to see previous issued commands insted of "Esc+K"?
May be you can copy the bash shell to your /bin directory and midify /etc/passwd to point to this shell.
Rgds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-26-2005 09:53 PM
тАО04-26-2005 09:53 PM
Re: How to use "up" key to see previous issued commands insted of "Esc+K"?
don't think its possible with the Posix Shell which is available in HPUX by default.
Linux has bash shell and supports the UP key.
Regards,
Naveej
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-26-2005 09:54 PM
тАО04-26-2005 09:54 PM
Re: How to use "up" key to see previous issued commands insted of "Esc+K"?
She was a very bright individual.
Her recommendation was remember when I switch between hp-ux and Linux.
If you use the bash shell on HP-UX you lose key features that you would expect on the OS. You CAN NOT change the root shell, so you have a hybrid situation anyhow.
bash is non-standard and if you ever want a vacation you should leave your HP-UX system in the way a backup our outside admin might expect to find it.
So, I recommend you not make this change.
You should be able to manipulate stty -a output to make this work with a termcap and TERM variable. A lot of work for little payoff.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-27-2005 12:33 AM
тАО04-27-2005 12:33 AM
SolutionHere's what to add... (man sh-posix or man ksh for details on emacs)
EDITOR=emacs
alias _A=^P
alias _B=^N
alias _D=^B
alias _C=^F
alias __A=^P
alias __B=^N
alias __D=^B
alias __C=^F
note that when you edit your .shrc, to get ^P you'l type ctrl-v then ctrl-p... same for ^N, ^B... etc...
When you logout/login you'll be able to use the arrow keys to recall previous cmds from your shell hist.
My login shell is posix, and I haven't tested w/ ksh... but I hope it would work just the same.
Hope this helps,
-denver
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-27-2005 01:22 AM
тАО04-27-2005 01:22 AM
Re: How to use "up" key to see previous issued commands insted of "Esc+K"?
Beside all great answers you already got, another possibility is to "learn vi and love it". Once you know the basic vi commands, you NEVER want to use another command line editor.
A great advantage of vi is that you can search in your history by typing: Esk+k
/
Cheers,
Renarios
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-29-2005 10:15 PM
тАО04-29-2005 10:15 PM
Re: How to use "up" key to see previous issued commands insted of "Esc+K"?
as said denver, it is a matter of unix emacs editing mode properly configured.
it is not a matter of shell (bash vs others) but a matter of editing mode.
linux is easy because it uses a properly configured emacs ed mode in bash by default
-cyrille
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-30-2005 03:31 AM
тАО04-30-2005 03:31 AM
Re: How to use "up" key to see previous issued commands insted of "Esc+K"?
For a 'real' terminal, there may be an emulation setting (HP 700/9x series has HP as well as EM settings) as well as a local/remote execution option. For instance, when set to local execution, the arrow keys just move the cursor--the shell knows nothing about this action. In remote execution, the key is assigned a couple of characters, usually ESC plus one other character. So pressing up-arrow on an HP terminal produces ESC A (ESC B for down and so on). Now the application (in this case, the shell) must trap a 2-character sequence in order to respond in some way to the arrow keys. And of course, the application must turn on the remote execution of special keys (in HP terminals, called transmit functions, and in Curses, the rmkx and smkx codes). vi does this automatically which is why the arrow keys work in vi with HP terminals and the default .exrc file in $HOME.
It's a do-able feature but so far, the changes to the POSIX and Korn shells have not been made. You may want to talk to your HP sales rep about an enhancement request.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-30-2005 12:02 PM
тАО04-30-2005 12:02 PM
Re: How to use "up" key to see previous issued commands insted of "Esc+K"?
esc +k then /
will display the latest command you are looking for ie.
you used a find string 10 commands previously:
esc +k then /find
this will display the last find command, if the command your searching is previous to this then press n key for the find command previous to that.
I know this doesn't answer your question however could prove useful if you continue to use the posix shell.