title: Delete entry from /etc/fstab using sed
body: <p>I am scripting a solution wherein, when a shared drive is removed from the server, we need to remove the entry from fstab as well.</p>
  
  <p>What I have done till now : </p>
  
  <pre><code>MP="${ServerAddress}:${DirectoryPath} ${MountPoint} nfs defaults 0 0"
  
  while read line; do
                  if [ "${MP}" = "${line}" ]; then
                      sed "/${line}/d"
                  fi
  done &lt; /etc/fstab
  </code></pre>
  
  <p>this is giving an error  >> sed: 1: "/servername.net...": command I expects \ followed by text</p>
  
  <p>Please suggest on this can be deleted.</p>
  
  <p>PS: I am running this as a part of the script, so i dont have to run this individually. While running with the suggested options, I am able to delete.. but during the script, this does not work and gives that error. People commenting on the " or the formatting, its just that I cannot copy from there since that is a remote through terminal server.</p>