14387 shaares
5333 private links
5333 private links
Q:
I often see tutorials online that connect various commands with different symbols. For example:
command1 | command2
command1 & command2
command1 || command2
command1 && command2
Others seem to be connecting commands to files:
command1 > file1
command1 >> file1
What are these things? What are they called? What do they do? Are there more of them?
A:
These are called shell operators and yes, there are more of them. I will give a brief overview of the most common among the two major classes, control operators and redirection operators, and how they work with respect to the bash shell.