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

Which two statements are true?
archeology is came from the word what?
if f(x)=4x^+1 and g(x)=x^-5, find (f-g)(x)
Create equations to solve for missing angles may be hard for me to solve. Need help on this!!​
Consider the quadratic equation 2x2 + 3x + 5 = 0. The discriminant of this quadratic equation is ________ zero. This means the quadratic equation will have ____
The domain of r:(3,-2)(1,2)(-1,-4)(-1,2)
La secadora A) Pongo los platos sucios (dirty) en _____. La cocina B) Pongo __________________ en la lavadora. El cortacésped C) Uso ____________ para secar la
What is the rate of change for this set of ordered pairs ? X | 0 | 1 | 2 | 3 | 4 y | 7 | 12 | 17 | 22 | 27 A)2 B)2.5 C) 5 D)4
which of the following describes a simple event?
Help me with my question plzzzzzzzzzzz and thx