summaryrefslogtreecommitdiffhomepage
path: root/bash.html.markdown
diff options
context:
space:
mode:
authoralexandre medeiros <alexandre.medeiros@students.ic.unicamp.br>2013-09-22 11:04:24 -0300
committeralexandre medeiros <alexandre.medeiros@students.ic.unicamp.br>2013-09-22 11:04:24 -0300
commit9c8c0af0af1caef57f463c7c41e56ccc76f414d6 (patch)
tree36cef9e169b09dcc37439035ee2d34b5078ae0f3 /bash.html.markdown
parent9d0f731ad5c6e3e9ccda43651eb4f445fc8234f0 (diff)
add information about input, output, and error redirection
Diffstat (limited to 'bash.html.markdown')
-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.