This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jmaki@jmaki-pc ~ | |
$ cat piping.sh | |
#!/bin/bash | |
while getopts oe arg; do | |
case "${arg}" in | |
o ) echo >&1 "This is writing to stdout" ;; | |
e ) echo >&2 "This is writing to stderr" ;; | |
* ) ;; # ignore | |
esac | |
done |