Deleting lines from a file: How can I remove single lines from a file?

It is not possible to delete lines from a file. Instead, rename the existing file, e.g. to "x.temp.txt"; then regenerate the file "x.txt" without the line(s) that you want deleted; then delete the "x.temp.txt" file.