I am looking for a test expression with a usage message. When I enter in command line a file such as ./file I need the script to stop and echo error. When I enter ./file test I need the file to run and enter file. I am having a hard time using test expression message. So far I have this and it sort of does what I want it to but I need to check and make sure ./file test is actually input to enter file. if it's not input at command properly it should spit an error and exit.
if [$# -eq 0 ]
then
echo"error"
exit 1
fi