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 readfile.sh, that is confusing. I will be glad if someone can expantiate.
  • post-author-pic
    Sean G
    10-16-2018

    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.

  • post-author-pic
    Temitope F
    10-17-2018

    The course is the System Administrator's Guide to Bash Scripting: Samples and Use cases: The input box


    Also; 

    case "`cat choice.txt`" in

    1) echo "Hello World"

    2) echo "Goodbyeworld ";;

    3) echo "Nothing";;

    X) echo "exit";;

    esac

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

    case "`cat choice.txt`"

Looking For Team Training?

Learn More