I want to output a file's contents while they change, for example if I have the file foobar and I do:magic_command foobarThe current terminal should display the file's contents and wait until, I don't know, I press ^C.Then if from another terminal I do:echo asdf >> foobarThe first terminal should display the newly added line in addition to the original file contents (of course, given that I didn't press ^C).I'll mark this as homework since I want to explore and learn linux, but it's not homework, it's just a curiosity of mine.
Output file contents while they change
terminal;tail;stdout
You can use tail command with -f  :tail -f /var/log/syslog It's good solution for real time  show.