- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Enabling arrow keys for history recall
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
тАО06-17-2004 06:48 PM
тАО06-17-2004 06:48 PM
Can someone help me with enabling arrow keys for history recall? csh or sh implementation wld be preferable.
Thanks in advance.
Regards,
Subu
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-17-2004 06:59 PM
тАО06-17-2004 06:59 PM
Re: Enabling arrow keys for history recall
I would install the bash shell,
http://hpux.connect.org.uk/hppd/hpux/Shells/bash-2.05b.007/
For solutions in sh or csh chech the man pages and take a look at
History Substitutions.
But i think installing bash will be a lot eaier.
Regards,
Gideon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-17-2004 07:02 PM
тАО06-17-2004 07:02 PM
Re: Enabling arrow keys for history recall
Bash does the trick but, see also some interesting posts in the next thread:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=605179
HTH,
Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-17-2004 07:03 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-17-2004 07:03 PM
тАО06-17-2004 07:03 PM
Re: Enabling arrow keys for history recall
export EDITOR=vi
export HISTFILE=~/.sh_history
export HISTSIZE=200
Use Esc+j Esc+k keys to move up and down with the history.
To make them persistent put them into
users .profile file.
If you are only looking for arrow keys just like doskey on windows then go with bash shell.
http://hpux.cs.utah.edu/hppd/hpux/Shells/bash-2.05b.007/
check for the dependencies too!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-21-2004 08:07 AM
тАО06-21-2004 08:07 AM
Re: Enabling arrow keys for history recall
Like Manikandan shows you set the editor to be vi (then a history size and a history file).
Remember that you can use vi commands to search through the history with /
And that you can edit the line as well.
We put this into /etc/profile and thus make it global.
If you prefer to have it pr.user you could add it to the current users ~username/.profile and the /etc/skel/.profile for new users.
/Tor-Arne
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-21-2004 09:26 PM
тАО06-21-2004 09:26 PM
Re: Enabling arrow keys for history recall
"Try this:
set -o emcas
in ~/.profile, have the
alias __A="^P"
"
It gives rise to the following when I tried up and down arrow keys :-
# ^P^P^P^P
sh: ^P^P^P^P: not found.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-21-2004 09:35 PM
тАО06-21-2004 09:35 PM
Re: Enabling arrow keys for history recall
For history recall we do this and it helps:
# ksh -o vi
Use "
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-21-2004 11:28 PM
тАО06-21-2004 11:28 PM
Re: Enabling arrow keys for history recall
To enable the history of commands make this /$HOME/.profile as
HISTFILE=/$HOME/.sh_history
HISTSIZE=200
( number of commands to be in history )
It will be activate from next login.
At now change as
# ksh -o vi
We can not scroll the commands with arrow keys as like in linux. We have to use as
[Esc]\
To go to other previous commands user n key, to come again use N
To go the end of command use $ and to the begin use ^
Check the ksh man page for more control options.
Regards,
Muthukumar