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

Who wrote the sonnet, “The New Colossus,” which is engraved on the pedestal of the Statue of Liberty?
How many people were living in the United States of America on July 4, 1776? 2.5 million 9 million 15 million 30 million
The 15th Amendment, which granted African Americans the right to vote, was passed on which date?
According to marginal analysis, you should spend more time studying economics if the extra benefit from an additional hour of study: a. is positive. b. outweigh
IDEAS FOR RECONSTRUCTION, explain why they are good ideas?
What is the formula for Slope-Intercept Form of the Line
What is English Literature??
What special group advises the President of the United States? a. The Cabinet b. The Electoral College c. The Executive Branch
How long is the term of Supreme Court justices? a. 20 years b. life c. until he or she reaches age 75
How long is the term of Supreme Court justices? a. 20 years b. life c. until he or she reaches age 75