The Unix philosophy prizes modularity and reusability, and heavily favors small tools that solve a given problem. A basic mastery of Unix tools and workflows can go a long way for user's who are proficient in a Unix environment.
This section assumes a basic working knowledge of Unix development including the use of an command-line editor (e.g., Emacs, Vim), basic Unix commands and utilities (e.g., ls, cd, man), and development toolchains (g++, Python3, Make).
Pipes |
and redirects >
are common tools for creating basic workflows by manipulating input and output of programs and files or streams. Like many
In order to illustrate the use of pipes and redirects, consider the following
time
wc
man
Consider the Python code:
While only occasionally convenient, limited Python3 code can also be entered directly on the command line with the command (-c
) flag.
$ python3 -c "print('Hello') ; print('World!')" Hello World!
/dev/null
/dev/random
/tmp/