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

changes to biome due to rice
How large a sample must a pollster take in order to estimate with 95% confidence and to within 3 percentage points, the proportion of voters who are in favor of
True or false you would use the imperfect tense to talk about an action that interrupts another
Anyone know the answer to all of them added together
how many countries are there in the world?​
Toryn, Inc., a major player in semiconductors, makes small investments of 5-10 percent of a firm's equity in many emerging technology companies. Toryn buys the
Lisosomas: Mitocondrias: ​
the average car on the highway travels 65 miles per hour. if someone has been driving for 4.5 hours how many miles have they driven (Help)
If Michel could have taken the noon train, he ______ in time for the meeting this evening.
What is the number with the mark