Getting this error syntax error near unexpected token `)'

Hi Everyone,

my script was running Ok, but suddenly it started giving this error.

./update_env_bi.sh: line 54: syntax error near unexpected token `)'
./update_env_bi.sh: line 54: `sed -i "s/PORT=[^)]*1/PORT=$2/" repository.xml'

The line 54 has this code.

sed -i "s/PORT=[^)]*1/PORT=$2/" repository.xml

$2 is the second command line argument

with above code, i am changing the port number in this line

<param name="url" value="jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dbhost.domain.com)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=DBSID)))"/>

what is the wrong with this line ?

sed -i "s/PORT=[^)]*1/PORT=$2/" repository.xml

---------- Post updated at 09:04 AM ---------- Previous update was at 08:48 AM ----------

i just checked it.

A " double quotes was missing in the echo command.

Its resolved now.
Thanks Bye Everyone.

I am guessing you intended to use extended regex. This requires that you escape characters with special meaning - like the ) character -> \)

Thanks Jim,

I had missed a double quotes "in echo command, so i was getting this error. now its resolved.