Error while executing switch case for find and replace specific file. Help Me...

case "$inputs" in
sapte)
find /pools/home_unix/sapte/work/models/model -name "*.xml" exec rm -i {} \;;
ckm1)
find /pools/home_unix/ckm1/work/models/model -name "*.xml" exec rm -i {} 
\;;

I am getting error like as below.

./menu1.sh: line 144: syntax error near unexpected token `)'
./menu1

.sh: line 144: `ckm1)'

Thanks.. prashant

You need an extra ; because find needs one, and the case needs two.

  blah) find ..... {} \; ;;

I prefer to put the ;; on a new-line:

case "$inputs" in
    sapte) find /pools/home_unix/sapte/work/models/model -name "*.xml" exec rm -i {} \;
    ;;
    ckm1) find /pools/home_unix/ckm1/work/models/model -name "*.xml" exec rm -i {}  \;
    ;;
esac

Scott thanks for reply

now i am geting another error which is as below.

enter option for checking specific user xml files to delete
sapte,ckm1,mdubey,hchede,amukherjee,skedar,averma,dbhatt,vmuthu,stiwari

sapte
find: bad option exec
find: [-H | -L] path-list predicate-list
Hit <ENTER> to continue:

thanks prashant:b:

Missing - for the exec option.

... -exec ...

ya scott it is working fine thanks for the same...prashant..