Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 May 2015 15:06:45 +0200
From:      Emmanuel Vadot <elbarto@bocal.org>
To:        FreeBSD FreeBSD <freebsd-questions@freebsd.org>
Subject:   Re: Problem with sed
Message-ID:  <20150518150645.0aaf7b513526c4f2a11d85e7@bocal.org>
In-Reply-To: <20150518090051.6600f32a@seibercom.net>
References:  <20150518090051.6600f32a@seibercom.net>

next in thread | previous in thread | raw e-mail | index | archive | help

 -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@seibercom.net> 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@bocal.org>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150518150645.0aaf7b513526c4f2a11d85e7>