cat
The cat (which stands for concatenate) command allows
you to view or create files and also pipe to other
commands. It’s one of the most useful commands in
UNIX when it comes to working with files. You can use
the cat command as follows:
$cat
file1.txt
Displays the contents of file1.txt
$cat
file1.txt |
more
Displays the contents of file1.txt and pipes the
output to more to add page breaks
$cat
>file2.txt
Sends a user’s typed or copied content from the
command line to file2.txt
Environment Variables
BASH environment variables contain information about
the current session. Environment variables are available
in all operating systems and are typically set when you
open your terminal from a configuration file associated
with your login. You set these variables with similar
syntax to how you set them when programming. You do
not often use these variables directly, but the programs
and applications you launch do. You can view all of your
currently set environment variables by entering the env
command. Since there can be more entries than you have
room to display on a single terminal page, you can pipe
the results to the more command to pause between
pages:
$env |
more
Shows all environment variables with page
breaks