

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 7
click for more info
Not enough gems
Cost: 6 gems
1: Help
incomplete
2: Flags
incomplete
3: Positional Arguments
incomplete
4: Exit Codes
incomplete
5: Standard Output
incomplete
6: Standard Error
incomplete
7: Standard In
incomplete
8: Piping
incomplete
9: Unix Philosophy
incomplete
This lesson's interactive features are locked, please to keep using them
Standard Error, usually called stderr, is a data stream just like standard output, but is intended to be used for error messages.
It's a separate stream so that you can redirect it to a different place if need be, but by default, it prints to your terminal just like stdout.
You can redirect stdout and stderr to different places using the > and 2> operators. > redirects stdout, and 2> redirects stderr.
stdout to a Fileecho "Hello world" > hello.txt
cat hello.txt
# Hello world
stderr to a Filecat doesnotexist.txt 2> error.txt
cat error.txt
# cat: doesnotexist.txt: No such file or directory
In this example, cat is used to intentionally generate an error message (since the file doesn't exist), which is then redirected to error.txt.
There's a worldbanc/private/bin/process_transactions.sh script that:
stdout, and old transactions (before 2000) to stderr.Submit the shell checks.
The temporary directory (/tmp) exists by default on all Unix-like systems, in your root directory. Files there are deleted by your system routinely. It's a great place to store temporary files that you don't need to keep around.
SCRIPT_PATH PATH_TO_CSV 2> /tmp/worldbanc.log