Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

bash

Posted on 2006-11-24
4
Medium Priority
?
188 Views
Last Modified: 2010-04-20
hello,
I have modified my /etc/bashrc file and I was wondering if there's a way of showing the time

instead of this
[(11:29 PM)][(root@server)] [(~)] $
to something like this
[(11:29 45 PM)][(root@server)] [(~)] $

this is what I have

    [ "$PS1" = "\\s-\\v\\\$ " ] && PS1="\[\033[1;32m\][\[\033[0;32m\](\[\033[1;37m\]\@\[\033[0;32m\])\[\033[1;32m\]]\[\033[1;32m\][\[\033[0;32m\](\[\033[1;37m\]\u\[\033[1;30m\]@\[\033[1;37m\]\h\[\033[0;32m\])\[\033[1;32m\]] \[\033[1;32m\][\[\033[0;32m\](\[\033[1;37m\]\w\[\033[0;32m\])\[\033[1;32m\]] \[\033[1;37m\]\$ "
0
Comment
Question by:Sabrin
  • 2
  • 2
4 Comments
 
LVL 85

Expert Comment

by:ozo
ID: 18010283
What is the 45 supposed to represent?
0
 

Author Comment

by:Sabrin
ID: 18010286
seconds
0
 
LVL 85

Accepted Solution

by:
ozo earned 2000 total points
ID: 18010296
PS1="[(\D{%I:%m %S %p})][(\u@\h)][(\w)]"
0
 

Author Comment

by:Sabrin
ID: 18010302
what will be the final code?
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Suggested Courses
Course of the Month10 days, 14 hours left to enroll

885 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question