Problem with sed

Jerry jerry at
Mon May 18 13:01:04 UTC 2015

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"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the freebsd-questions mailing list