- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- "doskey" like keyboard function
Operating System - HP-UX
1753809
Members
8519
Online
108805
Solutions
Forums
Categories
Company
Local Language
юдл
back
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
юдл
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
тАО11-19-1999 04:30 AM
тАО11-19-1999 04:30 AM
"doskey" like keyboard function
I've seen other people hit some sequence of keys to get a history of commands
entered come up on at the prompt (sort of like DOSKEY).
Can someone PLEEEEEEZEE tell me how to do this ?
entered come up on at the prompt (sort of like DOSKEY).
Can someone PLEEEEEEZEE tell me how to do this ?
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-19-1999 05:02 AM
тАО11-19-1999 05:02 AM
Re: "doskey" like keyboard function
The korn shell (my favorite) does this quite nicely. Put the following in
~/.profile:
set -o vi
alias r='fc -e -'
export HISTFILE="~/.sh_history"
export HISTSIZE=500 # or whatever
The key sequence is ESC then k. This puts you into your history mode, where you
can move back and forth using the j and k keys. You can also edit the command
like with vi commands.
The "alias r" is not really part of the history recall. It merely allows you to
type r to rerun the previous command in your history.
You can alternately use emacs editing mode if it's more familiar to you.
The bash shell will also do command history recall. Either case, you should
definately read the man page, as ksh is NOT standard across all
implementations.
MrNeil
~/.profile:
set -o vi
alias r='fc -e -'
export HISTFILE="~/.sh_history"
export HISTSIZE=500 # or whatever
The key sequence is ESC then k. This puts you into your history mode, where you
can move back and forth using the j and k keys. You can also edit the command
like with vi commands.
The "alias r" is not really part of the history recall. It merely allows you to
type r to rerun the previous command in your history.
You can alternately use emacs editing mode if it's more familiar to you.
The bash shell will also do command history recall. Either case, you should
definately read the man page, as ksh is NOT standard across all
implementations.
MrNeil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-19-1999 05:08 AM
тАО11-19-1999 05:08 AM
Re: "doskey" like keyboard function
Joe,
This "command line history" is normally done via the-k functionality
built into the vi editor. For this to work the following has to be done. This
is normally done in the ~/.profile of the user in ksh and POSIX shell and it
.login of csh.
export EDITOR=vi
export HISTFILE=~/.sh_history
export HISTSIZE=200
The file .sh_history must reside in the home directory of the user. If it does
not exist then touch an empty file called .sh_history. Once this is setup you
should be able to type-K to bring up previous commands.
NOTE: There is a known problem with this in NFS mounted directories. Logins may
hang in that setup.
This "command line history" is normally done via the
built into the vi editor. For this to work the following has to be done. This
is normally done in the ~/.profile of the user in ksh and POSIX shell and it
.login of csh.
export EDITOR=vi
export HISTFILE=~/.sh_history
export HISTSIZE=200
The file .sh_history must reside in the home directory of the user. If it does
not exist then touch an empty file called .sh_history. Once this is setup you
should be able to type
NOTE: There is a known problem with this in NFS mounted directories. Logins may
hang in that setup.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP