Write a program that
This is stdout.” to the standard output device and
This is stderr.” to the error output device.
$ ./erro This is stdout. This is stderr.
No input should be read.
Standard output should contain a single line with “
This is stdout.”.
Error output should contain a single line with “
This is stderr.”.
On the shell, you can redirect stdout and stderr to a file by using
$ ./erro >out.txt This is stderr. $ ./erro 2>err.txt This is stdout. $ ./erro >out.txt 2>err.txt
Use this to double-check your solution.
try first: file-write
try also: hello-cmd
try next: errxit
Copyright © 2020-2021 Rudy Matela
All rights reserved