Adding to a File
Add a second line without wiping out the first.
Two arrows, >>, mean "add to the end" instead of "replace". This is how you build a file up one line at a time without losing what is already in it.
Try to picture what a single > would have done here: level 1 would simply have vanished. One extra character is the difference between adding to your work and destroying it, which is why people who live at the terminal read that line twice.
cat the file afterwards: both lines are there, in the order they were added.
echo "text" >> file.txtAdd a line to the end.echo "text" > file.txtReplace everything (careful!).Your task
- ○Add a second line to scores.txt with >>
- ○Check both lines are there
Open this level in your browser to type the commands at a live terminal that answers back.