Hey all I created a simple shell script, im a noob to shell scripting, but I am trying to figure out what im doing wrong.
here is the script:
#!/bin/sh
if [ 'cat file' -eq "" ]
then
echo "installation not found"
else
cat file
fi
What im trying to accomplish is if cat can open the file then show the contents of it, if it cant then display a message. What am I doing wrong here? Thanks.
here is the script:
#!/bin/sh
if [ 'cat file' -eq "" ]
then
echo "installation not found"
else
cat file
fi
What im trying to accomplish is if cat can open the file then show the contents of it, if it cant then display a message. What am I doing wrong here? Thanks.
