- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- time on PS1
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
Forums
Discussions
Discussions
Discussions
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
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
05-28-2003 06:01 AM
05-28-2003 06:01 AM
time on PS1
thank for your support
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2003 06:03 AM
05-28-2003 06:03 AM
Re: time on PS1
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2003 06:10 AM
05-28-2003 06:10 AM
Re: time on PS1
#
# put this function in your .profile
# and rock
TIME=$(date +%H:%M)
export PS1=":`hostname`:`/usr/bin/whoami`:\${PWD}:\${TIME} "
}
then make sure to call the function towrds the end of your .profile
set_prompt
live free or die
donny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2003 06:12 AM
05-28-2003 06:12 AM
Re: time on PS1
Try this for full date including the time:
export PS1="`date -u +%c`# "
This will only give you the date:
export PS1="`date`# "
Regards,
DR
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2003 06:16 AM
05-28-2003 06:16 AM
Re: time on PS1
sad but true. it does not keep up with the system time.
you will only notice the logged in time
if you find simething that can do it let me know.
tip: never use ">" in your prompt to end it.
reason: say your prompt is like this
myhp:myuser:/home/myuser:13:20 >
then for some reason down the line you want to cut and paste from your console.
guess what will happen if you accidently cut and paste this
> /etc/passwd
or any othe file which you have write privileges to
peace,
live free or die
donny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2003 06:31 AM
05-28-2003 06:31 AM
Re: time on PS1
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2003 06:58 AM
05-28-2003 06:58 AM
Re: time on PS1
waiting for you, best regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2003 07:15 AM
05-28-2003 07:15 AM
Re: time on PS1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2003 07:36 AM
05-28-2003 07:36 AM
Re: time on PS1
that is a built in feature of bash.
compile and install bash on hp-ux. then you'll be set.
also, points would be nice
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2003 07:56 AM
05-28-2003 07:56 AM
Re: time on PS1
points u'll have. don't worry about it.
best regards