42-archive/42sh/shellscript/if/002-simple-if-2/stdin

13 lines
380 B
Text

if [ -f no_${GLOBAL_TOKEN}_FILE ]
then
./write_on_stdout ${GLOBAL_TOKEN}_error
elif [ -f no_${GLOBAL_TOKEN}_FILE ]
then
./write_on_stdout ${GLOBAL_TOKEN}_error
elif [ -f ${GLOBAL_TOKEN}_FILE ]
then
./write_on_stdout_and_stderr ${GLOBAL_TOKEN}_stdout ${GLOBAL_TOKEN}_stderr | ./read_on_stdin
./delete-file ${GLOBAL_TOKEN}_FILE
else
./write_on_stdout ${GLOBAL_TOKEN}_error
fi