[ACCEPTED]-syntax error near unexpected token `('-shell

Accepted answer
Score: 20

Since you've got both the shell that you're 4 typing into and the shell that sudo -s runs, you 3 need to quote or escape twice. (EDITED fixed 2 quoting)

sudo -su db2inst1 '/opt/ibm/db2/V9.7/bin/db2 force application \(1995\)'

or

sudo -su db2inst1 /opt/ibm/db2/V9.7/bin/db2 force application \\\(1995\\\)

Out of curiosity, why do you need 1 -s? Can't you just do this:

sudo -u db2inst1 /opt/ibm/db2/V9.7/bin/db2 force application \(1995\)
Score: 3

Try

sudo -su db2inst1 /opt/ibm/db2/V9.7/bin/db2 force application \(1995\)

0

More Related questions