Thursday 8 March 2012

Clear Screen & Display Today date and Time In linux


Modify your shell, such that every time you enter clear, it clears screen and on top of new
screen displays “Welcome username. You are using shel Today is date and time”. Where username
is the name of the user logged in,shel is the path to the shell you are using and date and time
is current date and time. 15 Marks


In order to display “Welcome username. You are using shell. Today is date_and_time” following
command can be used:
echo Welcome $USER. You are using $SHELL. Today is $(date)
In order to modify shell, such that every time clear is entered, this command is executed AFTER clearing
the shell, an alias can be defined as follows:
alias clear=”clear; echo Welcome $USER. You are using $SHELL. Today is $(date)”

0 comments:

Post a Comment

 
Free Host | lasik surgery new york