I'm currently crafting a script to use a command to check for a file before proceeding with execution of a task. I'm not very skilled with writing a script using bash, and various other tools, as usually tools like "Find" simply outputs and then stops execution.
How can I use the bash shell to generate an output that checks for a file using for example an if/else sequence, and then executes one of two commands in sequence such as this sample script (
please correct as needed)
Code:
if [ -h /usr/lib/libX11.so ]; then
echo "Found file libX11.so"
else
echo "Could not find libX11.so"
fi
Thank you.