3.5 Exercises

3.5.1 Redirection

See Section 12.0.3 for solutions.

  1. Create a directory “human” and enter it. Use echo to write ”completely empty” to a file called brain.txt.

  2. Print the content of brain.txt to the screen.

  3. Append “…but still so smart” to “brain.txt”.

  4. Create two additional empty files “heart.txt” and “soul.txt”. Use ls to write the content of your directory to a file called “allEmpty.txt”. Use cat to verify the content.

  5. Use bc to calculate the product of 23 and 57.