Forrest logo
back to the awk tool

awk:ai:a64a1

Delete a single line from a given file with awk
$ awk '!/pattern/' filename > newfile
try on your machine

Deletes a single line containing the specified pattern from the given file and saves the modified content to a new file.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.

Questions that are answered by this command:

  • Delete a single line from a given file with awk?
back to the awk tool