mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-08-14 02:34:17 +02:00
Merge pull request #2883 from harrymt/patch-3
[bash/en] Fixed formatting for The Black Hole
This commit is contained in:
committed by
GitHub
commit
6fc63e34b2
@@ -15,6 +15,7 @@ contributors:
|
|||||||
- ["Leo Rudberg", "https://github.com/LOZORD"]
|
- ["Leo Rudberg", "https://github.com/LOZORD"]
|
||||||
- ["Betsy Lorton", "https://github.com/schbetsy"]
|
- ["Betsy Lorton", "https://github.com/schbetsy"]
|
||||||
- ["John Detter", "https://github.com/jdetter"]
|
- ["John Detter", "https://github.com/jdetter"]
|
||||||
|
- ["Harry Mumford-Turner", "https://github.com/harrymt"]
|
||||||
filename: LearnBash.sh
|
filename: LearnBash.sh
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -235,10 +236,8 @@ EOF
|
|||||||
python hello.py < "input.in" # pass input.in as input to the script
|
python hello.py < "input.in" # pass input.in as input to the script
|
||||||
python hello.py > "output.out" # redirect output from the script to output.out
|
python hello.py > "output.out" # redirect output from the script to output.out
|
||||||
python hello.py 2> "error.err" # redirect error output to error.err
|
python hello.py 2> "error.err" # redirect error output to error.err
|
||||||
python hello.py > "output-and-error.log" 2>&1 # redirect both output and
|
python hello.py > "output-and-error.log" 2>&1 # redirect both output and errors to output-and-error.log
|
||||||
# errors to output-and-error.log
|
python hello.py > /dev/null 2>&1 # redirect all output and errors to the black hole, /dev/null, i.e., no output
|
||||||
python hello.py > /dev/null 2>&1 # redirect all output and errors to
|
|
||||||
# the black hole, /dev/null, i.e., no output
|
|
||||||
# The output error will overwrite the file if it exists,
|
# The output error will overwrite the file if it exists,
|
||||||
# if you want to append instead, use ">>":
|
# if you want to append instead, use ">>":
|
||||||
python hello.py >> "output.out" 2>> "error.err"
|
python hello.py >> "output.out" 2>> "error.err"
|
||||||
|
Reference in New Issue
Block a user