Linux
TO DISPLAY THE DATE & TIME IN GIVEN FORMAT
INTRODUCTION TO THE TERMINAL
The terminal is a window that is also known as a terminal emulator. It is a text-only window in GUI* emulates console. Console and terminal are CLI*.
INTRODUCTION TO THE TOPIC
The scripting is written in vim editor. I will make a post in which I will inform you in detail about the terminal and how to write a script in the terminal. I will also make a video for a better understanding of topics that I write in a post.
In this topic I will write a script in vim editor to display time and date in the format given below:-
FORMAT
Today is February 27,2018 and the current time is 10:25:15
SCRIPT
clear
echo "Today is `date +"%B %d %Y"`and current time is `date +"%T"`"
OUTPUT
CONCLUSION AND PROCESS
Process:-
Write vi and file name in windows like
Write vi and file name in windows like
vi Pranav
you will enter into the vim editor.
ESCAPE key is steps to travel from command mode to insert mode and to last line mode
when vim editor opens the mode firstly appears is known as a command-line mode.
when you do the process escape + i you will come in insert mode.
\And last for last line mode the process is ESCAPE + :(colon). I concluded this topic.
please subscribe for email notification.
No comments