Working with Linux terminals is a very beautiful and exciting journey. we looked at 3 basic commands in my last post. today we will explore the I/O redirection is a powerful feature.
I/O: input/Output redirection.
In one word, the I/O redirection is a feature by which through commands we make redirection in and out of directories, manipulate files, file content, and more.
Always remember that the computer is commendable
Task 1: Create a dir with the name lesson2 and enter the dir lesson2
mkdir lesson2 && cd lesson2
Task 2: Create 3 files hello, family, friends
touch hello family friends
Standard Output: used to direct contents to the display. example “>” and “>>”.
Examples:
echo "wife : Sandra" > family.txt
Inputs wife : Sandra into the family.txt file. you can , cat family.txt to see the result. Note it overrides any content in the file family.txt.