View Single Post
Old 10-05-2012, 12:28 PM   #39
geekmaster
Всё гениальное просто.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 5,067
Karma: 6789001
Join Date: Nov 2011
Location: Щедрость не имеет пределов.
Device: *.*
Quote:
Originally Posted by pinchajetas View Post
...
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")...

Last edited by geekmaster; 10-05-2012 at 12:31 PM.
geekmaster is offline   Reply With Quote