View Single Post
Old 10-05-2012, 12:28 PM   #39
geekmaster
Overthinking reality.
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: 6,352
Karma: 10764490
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
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 online now   Reply With Quote