if you also want to write to a file it should look something like this

echo yourtexthere > text.txt (or any other filename)

and to add to another line after that:

echo yourtexthere >> text.txt

note: ">" creates a new file, ">>" adds to an existing file
i dont know really what the official use of this is but it can come in handy for creating log files