Quote:
Originally Posted by pinchajetas
...
So I changed it to:
Code:
if [ -e /mnt/us/RUNME.sh ];
then [ sh /mnt/us/RUNME.sh]
fi
But I get this:
"sh: /mnt/us/RUNME.sh: unknown operand"
What should I do to get it right?
|
Add a space before the right bracket:
Code:
if [ -e /mnt/us/RUNME.sh ];
then [ sh /mnt/us/RUNME.sh ]
fi
Also, double brackets are native to the shell, where "[" is an external program located in /bin/. I would use
"
if [[ -e /mnt/us/RUNME.sh ]]" instead (even though it is less "condensed")...