Skip to main content

1 year ago

The Input Box

In this section, I understand why send std error to a file. What I don't understand is the criteria for choosing a file?

2) Also we cat "`tmpfile.txt`" but the instructor used another shell script, that is confusing. I will be glad if someone can expantiate.

Image of seang
1 year ago
What specific lesson are  you on? If you let us know where you're at in the course, we can review and clarify once we see what you're trying to understand.

As for which file to choose, if you're making a custom script then it's entirely up to you. There isn't a hard rule on where/how to store or name error logs for custom scripts.
Image of tfabiyi1
12 months ago
The course is the System Administrator's Guide to Bash Scripting: Samples and Use cases: The input box


case "`cat choice.txt`" in

1) echo "Hello World"

2) echo "Goodbyeworld ";;

3) echo "Nothing";;

X) echo "exit";;


So, if there were no error messages sent to choice.txt, then please explain why we did this

case "`cat choice.txt`"