ondreduty9759 ondreduty9759
  • 03-12-2020
  • Computers and Technology
contestada

How would you change your prompt to have it display the current time (hour and minute) and the full path of the current directory?

Respuesta :

tgalligan92 tgalligan92
  • 03-12-2020

Answer:I tried using following command:

Code:

export PS1="$(date +%k:%M:%S) $ "

but it gave me a fixed time in prompt whereas my objective is to get the current time everytime.

Code:

$ export PS1="$(date +%k:%M:%S) $ "

17:42:42 $

17:42:42 $ date

Tue Oct  2 17:42:54 PDT 2012

17:42:42 $

Explanation:

Answer Link

Otras preguntas

Where does the name "Black Hole" get it's name?
what is the value of the dependent variable if the value is 0? f(x)=-13x2+5x-2x+8
What is 8/16 in simplest form
What would seasons be like if the revolution around the sun took 2 years
What is Linear Mime?
Why does friction make it harder to move things?
At one time during 2001 for every 20 copies of Harry Potter and the Sorcerer's Stone that were sold 13.2 copies of Harry Potter and the Prisoner of Azkaban were
The jacket is reduced in price from $40 to $30 what's The percentage of decrease in the price
What's the square root of 1375?
Which one of the following sentences uses the comma or commas correctly? A. Giving it their best none of the swimmers broke, John Gore’s, record. B. Johnson