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

evaluate 0.53n + 5 when n= 3 and when n= -3
can i get some help for this thanks
(can someone help me with my french. below is the question x) Look at the task card and do this short writing task.Un site Internet français pour les jeunes vou
Can someone help me please with the Problem and the subject is economic???
How does the design of your experiment control for outside factors that may affect the results?
Jayden is running laps at track practice. The track is 2/5 kilometers around. Jayden runs 1 lap in 2 minutes. How many minutes does it take Jayden to run 1 kilo
Here are 30 best lifetime baseball batting averages of all time is shown to the right. These data can be graphically displayed as a histogram. Which of the foll
How did the United States try to influence Vietnam’s national elections in 1956?
100 pts. Summarize the Immigration act of 1924 in 5-7 sentences
Abbott Landscaping purchased a tractor at a cost of $45,000 and sold it three years later for $21,000. Abbott recorded depreciation using the straight-line meth