Btw, if you just want to delete a certain line, the following expression would work:
sed -i '/expression/d' filename
This removes all lines containing “expression” no matter where.
In the case the line to be removed is immediately starting with “cifs” it would look like this:
sed -i '/^cifs/d' /etc/auto.master
In the case the line starting with “cifs” has multiple empty spaces before the expression it would look like this:
sed -i '/^ *cifs/d' /etc/auto.master
(Notice the empty space between the circumflex and asterisk. The asterisks means “any number of the sign before” which in this case is an empty space.)
For testing purposes, you can leave “-i” and it won’t overwrite the file, only giving standard output to the shell.
Be careful using sed. Its extremely easy to screw everything up.