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

What are nurseries, nursery classes attached to primary schools, preschools and playgroups, primary school reception classes, accredited childminders and sure s
1.The table shows the results of drawing colored marbles from a bag. Based on theoretical probability, which is the best prediction for the number of times a r
Solve 3x2 + 12x = 3.
what does memorial services mean
what climate comprises most of North africa
A function is shown in the table. x g(x) −2 2 −1 −3 0 2 1 17 Which of the following is a true statement for this function? (A)The function is increasing from x
What are 10 facts on the respiratory system?
Round the fraction to the nearest whole number. 2/9
Which statement about sister chromatids is true?
Which of the radioactive emissions has the highest energy