summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--bash.html.markdown7
1 files changed, 7 insertions, 0 deletions
diff --git a/bash.html.markdown b/bash.html.markdown
index 81565b6d..f281c1eb 100644
--- a/bash.html.markdown
+++ b/bash.html.markdown
@@ -86,6 +86,13 @@ ls -l # Lists every file and directory on a separate line
# txt files in the current directory:
ls -l | grep "\.txt"
+# You can also redirect a command output, input and error output.
+python2 hello.py < "input.in"
+python2 hello.py > "output.out"
+python2 hello.py 2> "error.err"
+# The output error will overwrite the file if it exists, if you want to
+# concatenate them, use ">>" instead.
+
# Commands can be substitued within other commands using $( ):
# The following command displays the number of files and directories in the
# current directory.