View Single Post
Old 10-05-2012, 12:28 PM   #39
geekmaster
bit basher & pixel pusher
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,688
Karma: 7581653
Join Date: Nov 2011
Location: A young man living in an old man's body.
Device: Too many.
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