Using if/else/fi
by jharris4854 from LinuxQuestions.org on (#4T5XP)
I recently began to learn Linux. I was told to try linuxfromscratch. I quickly realized I need to learn some basics first. I usually try to figure things out on my own but I've exhausted myself using google and can't find the answer I need. I repeatedly see this and cannot understand, what appears to be an option to a command, the purpose of:
if [ -h /usr/bin/yacc ]; then
echo "/usr/bin/yacc -> `readlink -f /usr/bin/yacc`";
I know it checks the version of yacc, but I have no idea what the '-h' does or why that is syntactically correct. If there is a site someone can direct me to to get basic answers like this so I don't clog up the forum, I would appreciate it.
Thanks so much for the help in advance. I really hope I posted in the correct forum.


if [ -h /usr/bin/yacc ]; then
echo "/usr/bin/yacc -> `readlink -f /usr/bin/yacc`";
I know it checks the version of yacc, but I have no idea what the '-h' does or why that is syntactically correct. If there is a site someone can direct me to to get basic answers like this so I don't clog up the forum, I would appreciate it.
Thanks so much for the help in advance. I really hope I posted in the correct forum.