6 examples for echo
1 2 3 4 5 6 7 8 9 10 11 12 13 | #the echo command outputs the result of what it receive as input echo "hello bro!" > hello bro! #this output can be a command be the result of a command, for example 'pwd' to output the Present Working Directory echo $( pwd ) > /path/to/the/present/working/directory #this could be useful to log stuff in a document, using '>' or '>>' : hereafter, the commands add the pwd to a document echo $( pwd ) >> ~ /logs/logingmypwd #it can also have colors!! using the -e option and colors codes echo -e "\e[0;32mHello This Text is Green!![0mBut This Text Isn't" |
1 2 3 4 5 | # print the shell environment variable 'home' to standard output echo $HOME # apend 'bro' (newline) to the end of bro.txt, create the file if !exists echo 'bro' >> bro.txt |