From 9c8c0af0af1caef57f463c7c41e56ccc76f414d6 Mon Sep 17 00:00:00 2001 From: alexandre medeiros Date: Sun, 22 Sep 2013 11:04:24 -0300 Subject: add information about input, output, and error redirection --- bash.html.markdown | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'bash.html.markdown') 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. -- cgit v1.2.3