EDIT: Resolved
Resolved by changing the first line to bash rather than csh, does bash and csh treat the [] brackets differently?
Hi all,
I'm doing to some basic stuff to teach myself "if"
I've written the following:
#!/bin/csh
echo "This script checks for the test file"
if [ -a /testing/scripts/test.tst ]
then
echo "It is here!"
fi
echo
echo "All done!"
When I run it it just outputs:
#./IF_TEST.sh
This script checks for the test file
Missing ]
I did some googling and found a lot of people had this issue but where they weren't putting a space between the content and the brackets but mine does have a space?