Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I can't seem to run portsnap anymore, there seems to be an error and /usr/ports/sysutils/portsnap doesn't exist for a reinstallation.

The error I'm getting when running portsnap is:

/usr/sbin/portsnap: line 882: syntax error near unexpected token 'newline' 
/usr/sbin/portsnap: line 882: ' if !'

Can anyone help me out here.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Your error seems to indicate that some other shell is running the script and not sh.

Have a look at this thread: http://lists.gnu.org/archive/html/bug-bash/2008-06/msg00078.html

What happens if you do sh /usr/sbin/portsnap fetch?

share|improve this answer
    
That was the problem! Thanks, it turned out I had replaced sh with a different script. –  Sandeep Bansal May 21 '11 at 13:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.