- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How do I create Shell Shortcuts
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
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
тАО10-23-2002 06:02 AM
тАО10-23-2002 06:02 AM
into my profile to get those
cool command line shortcuts
that do things like History
using Esc K to recall the
previously typed commands,
the way to get the hostname
to display at the shell
prompt and any other cool
things that are typically
seen on an HPUX box.
Thanks, Bill
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-23-2002 06:08 AM
тАО10-23-2002 06:08 AM
SolutionFirst, this cool features depend of the shells.
csh, bash and other shell react differently. The ESC-k is a ksh/sh feature when HIST_FILE is defined. For the prompt it is defined by PS1 and PS2 variable. So I think you should take a look at man pages of your favorite shell (for myself it is bash).
Good luck.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-23-2002 06:11 AM
тАО10-23-2002 06:11 AM
Re: How do I create Shell Shortcuts
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-23-2002 06:12 AM
тАО10-23-2002 06:12 AM
Re: How do I create Shell Shortcuts
set -o vi
it's a vi style prompt.
Later,
Bill
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-23-2002 06:15 AM
тАО10-23-2002 06:15 AM
Re: How do I create Shell Shortcuts
I actually dug out my HPUX
manual from the dust and
realized there was a whole
chapter on it. You guys replied way too fast for me !
Thanks
Bill
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-23-2002 06:17 AM
тАО10-23-2002 06:17 AM
Re: How do I create Shell Shortcuts
set -o vi
for prompt
PS1=`hostname`@`logname`"#"
history
HISTSIZE=500
HISTFILE=.sh_history
export HISTSIZE HISTFILE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-23-2002 10:27 PM
тАО10-23-2002 10:27 PM
Re: How do I create Shell Shortcuts
regarding the histfile. Dont make the same mistake and store the histfile on a NFS mounted directory.
This works only 99% of the time. But suddenly your user just cant log in any more.
So this looks like:
HISTFILE=/tmp/.sh_history.$LOGNAME
export HISTFILE
Regards Stefan