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

a shopper bought a 15 pound bag of oranges for $23.25 what was the unit price
What religion got caught in the middle of wars between Catholicism and Islam in Spain?
4x - (9 - 3x) = 8x - 1
What would be your definition of Social Studies?
If you exert a force on an object in motion you will change its ____. a. mass c. inertia b. weight d. momentum
What problem did socialist thinkers seek to solve?
Who led movements to establish the Republic of Turkey?
In which list are the elements arranged in order of increasing atomic mass? A) CI ,K ,Ar B) Fe ,Co ,Ni C) Te ,I ,Xe D) NE ,F,Na
True or False: A flame test can be used to identify the presence of certain elements in a compound?
How are light years used to measure distances in the universe