title: How to make shell script to make changes by end user easily
body: <p>This is requirement i want to replace the following  string  </p>
  
  <pre><code>OPTIONS="-p ${PIDFILE}"
  </code></pre>
  
  <p>with  </p>
  
  <pre><code>OPTIONS_1234="-p ${PIDFILE_1234} -ORBEndpoint iiop://10.12.23.34:1234"
  
  OPTIONS_1235="-p ${PIDFILE_1235} -ORBEndpoint iiop://10.12.23.34:1235"
  
  OPTIONS_1236="-p ${PIDFILE_1236} -ORBEndpoint iiop://10.12.23.34:1236"
  </code></pre>
  
  <p>for this i'm following script to work around </p>
  
  <pre><code>sed '0,/\PIDFILE=\/var\/run\/Naming_Service.pid/s//\PIDFILE_13021=\/var\/run\/Naming_Service_13021.pid\n\PIDFILE_13022=\/var\/run\/Naming_Service_13022.pid\n\PIDFILE_13023=\/var\/run\/Naming_Service_13023.pid\n /' tao &gt; tao_pid
  sed '0,/\OPTIONS="-p ${PIDFILE}"/ s//\OPTIONS_13021="-p ${PIDFILE_13021} -ORBEndpoint iiop:\/\/10.12.23.34:13021"\n\OPTIONS_13022="-p ${PIDFILE_13022} -ORBEndpoint iiop:\/\/10.12.23.34:13022"\n\OPTIONS_13023="-p ${PIDFILE_13023} -ORBEndpoint iiop:\/\/10.12.23.34:13023"\n /' script &gt; new_script
  </code></pre>
  
  <p>But if end user want to  add one more like </p>
  
  <pre><code>OPTIONS_1236="-p ${PIDFILE_1236} -ORBEndpoint iiop://10.12.23.34:1237"
  </code></pre>
  
  <p>it difficult to maintain special characters and all. 
  anybody can suggest best optimized way to do that should  be easy for end user  </p>