This will only work for this login session for this user and this environment (and any spawned from it). To make it work for every login for this user, append that line to ~/.bash_profile
Check by entering:
cat greetings
Use standard output of command as standard input to another. There can be multiple pipes involved (i.e., each command separated by pipe character).
Simple example: ls -lt | head