- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- .profile and .kshrc help
Operating System - HP-UX
1819791
Members
3166
Online
109607
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
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
Go to solution
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-06-2001 11:22 AM
тАО11-06-2001 11:22 AM
Good Day.
I'm building my first custom .profile and .kshrc and I was looking for some kool commands and what they do. for example, what do you do to set file completion in ksh, and kool stuff like that.
thx.
scott
I'm building my first custom .profile and .kshrc and I was looking for some kool commands and what they do. for example, what do you do to set file completion in ksh, and kool stuff like that.
thx.
scott
I'm ok
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-06-2001 11:28 AM
тАО11-06-2001 11:28 AM
Re: .profile and .kshrc help
Hi Scott,
.profile and .kshrc options.
I suppose you use the korn shell.
you can use:
set -o vi # puts vi on at the command line (use/ to search in history)
PS1=`uname -n`>"$PWD $" # to have machine name and dir name in prompt
do not forget to export the variables.
Hope this will get you started.
Gideon
.profile and .kshrc options.
I suppose you use the korn shell.
you can use:
set -o vi # puts vi on at the command line (use
PS1=`uname -n`>"$PWD $" # to have machine name and dir name in prompt
do not forget to export the variables.
Hope this will get you started.
Gideon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-06-2001 11:59 AM
тАО11-06-2001 11:59 AM
Re: .profile and .kshrc help
Setting prompt in .profile:
PWD=`pwd`
HOST=`hostname`
PS1='$HOST:$PWD>'
export PS1 PWD HOST
Setting history
set -o vi
Setting umask
umask 027
Shutoff messaging
mesg n
Appending to PATH
PATH=$PATH:xyz:xyz1
export PATH
These are not 'cool' commands but dull and necessary ones ;-)
-raj
PWD=`pwd`
HOST=`hostname`
PS1='$HOST:$PWD>'
export PS1 PWD HOST
Setting history
set -o vi
Setting umask
umask 027
Shutoff messaging
mesg n
Appending to PATH
PATH=$PATH:xyz:xyz1
export PATH
These are not 'cool' commands but dull and necessary ones ;-)
-raj
Take it easy.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-06-2001 12:22 PM
тАО11-06-2001 12:22 PM
Solution
Hi Scott:
Have a look at the "Shells: User's Guide" for a discussion of shell features:
http://docs.hp.com/hpux/onlinedocs/B2355-90046/B2355-90046.html
Remember that you *never* want to change the default root shell, as defined in /etc/passwd', to be other than the Posix (sh) shell: '/sbin/sh'. Should you do this, you will end up with an unbootable system!
Since the Posix shell is a superset of the Korn shell, as provided by HP, I see no reason to use 'ksh'.
The 'vi' editor is set by default in the 'profile' provided in '/etc/skel/.profile' and file name completion (by pressing the ESC(ape) key twice) is part of the shell.
For my own sanity (and protection) I place the following aliases in my profiles:
alias cp='cp -ip'
alias mv='mv -i'
alias rm='rm -i'
alias rmdir='rmdir -i'
For ease of system identification I change the PS1 prompt to be:
PS1=`hostname`" # ";export PS1
...and I set a secure 'umask':
umask 027
Regards!
...JRF...
Have a look at the "Shells: User's Guide" for a discussion of shell features:
http://docs.hp.com/hpux/onlinedocs/B2355-90046/B2355-90046.html
Remember that you *never* want to change the default root shell, as defined in /etc/passwd', to be other than the Posix (sh) shell: '/sbin/sh'. Should you do this, you will end up with an unbootable system!
Since the Posix shell is a superset of the Korn shell, as provided by HP, I see no reason to use 'ksh'.
The 'vi' editor is set by default in the 'profile' provided in '/etc/skel/.profile' and file name completion (by pressing the ESC(ape) key twice) is part of the shell.
For my own sanity (and protection) I place the following aliases in my profiles:
alias cp='cp -ip'
alias mv='mv -i'
alias rm='rm -i'
alias rmdir='rmdir -i'
For ease of system identification I change the PS1 prompt to be:
PS1=`hostname`" # ";export PS1
...and I set a secure 'umask':
umask 027
Regards!
...JRF...
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.
Company
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP