Redirection: myname.txt
Creating myname.txt
Using the echo
command and the redirection write operator >
, create a new file named myname.txt
that contains your first name.
Solution
Overwrite myname.txt
Using the echo
command and the redirection write operator >
, overwrite the myname.txt
that contains a more informative line like firstName=[YOUR FIRST NAME]
.
Solution
Appending to myname.txt
using the echo
command and the redirection append operator >>
, append your last name as a new line to the myname.txt
file like lastName=[YOUR LAST NAME]
.
Solution
Verification of myname.txt
How can you verify that myname.txt
matches the following structure?
firstName=[YOUR FIRST NAME]
lastName=[YOUR LAST NAME]