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

CLICK FOR ANSWER

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

CLICK FOR ANSWER

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

CLICK FOR ANSWER

Verification of myname.txt

How can you verify that myname.txt matches the following structure?

firstName=[YOUR FIRST NAME]
lastName=[YOUR LAST NAME]
CLICK FOR ANSWER