Problem with sed

Emmanuel Vadot elbarto at
Mon May 18 13:13:44 UTC 2015

 -i is for backup file
 Use -i"" if you don't want any backup and replace in file
 Use -i.bak for example to backup the original file as file.bak

On Mon, 18 May 2015 09:00:51 -0400
Jerry <jerry at> wrote:

> I rarely use sed, so I admit to not being fully acquainted with its
> idiosyncrasies,; however, this one is really annoying.
> I am using this command in an attempt to remove empty lines:
> $ sed -i /^$/d /var/tmp/myfile.txt
> and get this error:
> sed: 1: "/var/tmp/myfile.txt": undefined label 'mp/myfile.txt'
> I don't understand why. I am following the example I found in the "sed & awk" handbook by "O'Reilly"

Emmanuel Vadot <elbarto at>

More information about the freebsd-questions mailing list