On 22/10/2022 20:23, Gary Dale wrote:
sed -i '//d' *.html
did the trick.
I would suggest you to use more specific pattern to avoid removing of
meaningful text due to a lost newline character:
sed -i -e '/^\s*]*>\s*$/d'
"." in regexp may be a source of surprises (or catastrophic backtr
On 2022-10-21 15:14, David Wright wrote:
On Fri 21 Oct 2022 at 14:15:01 (-0400), Greg Wooledge wrote:
On Fri, Oct 21, 2022 at 08:01:00PM +0200, to...@tuxteam.de wrote:
On Fri, Oct 21, 2022 at 01:21:44PM -0400, Gary Dale wrote:
I'm hoping someone can tell me what I'm doing wrong. I have a line
On Sat, Oct 22, 2022 at 10:32:24AM +0700, Max Nikulin wrote:
> On 22/10/2022 02:09, The Wanderer wrote:
> >
> > 'info sed', section 'sed regular expressions', subsection 'regular
> > expression extensions':
>
> While a reader may find more interesting stuff lying around while traveling
> by this
On 22/10/2022 02:09, The Wanderer wrote:
'info sed', section 'sed regular expressions', subsection 'regular
expression extensions':
While a reader may find more interesting stuff lying around while
traveling by this path, there is a shorthand
info "(sed) regexp extensions"
and alternatives
On 2022-10-21 at 16:16, Greg Wooledge wrote:
> On Fri, Oct 21, 2022 at 03:09:32PM -0400, The Wanderer wrote:
>
>> IOW, each seems to be half of the usual '\b' (edge of a word) set.
>> With the default sed behavior (not sure whether that's basic
>> regular expressions or extended regular expressio
On Fri, Oct 21, 2022 at 03:09:32PM -0400, The Wanderer wrote:
> IOW, each seems to be half of the usual '\b' (edge of a word) set. With
> the default sed behavior (not sure whether that's basic regular
> expressions or extended regular expressions, in the nomenclature of the
> info document), you c
On Fri 21 Oct 2022 at 14:15:01 (-0400), Greg Wooledge wrote:
> On Fri, Oct 21, 2022 at 08:01:00PM +0200, to...@tuxteam.de wrote:
> > On Fri, Oct 21, 2022 at 01:21:44PM -0400, Gary Dale wrote:
> > > I'm hoping someone can tell me what I'm doing wrong. I have a line in a
> > > lot
> > > of HTML file
On 2022-10-21 at 14:15, Greg Wooledge wrote:
> So... yeah, \< and/or \> clearly have some special meaning to GNU
> sed. Good luck figuring out what that is.
'info sed', section 'sed regular expressions', subsection 'regular
expression extensions':
>> '\<'
>> Matches the beginning of a word.
On Fri, Oct 21, 2022 at 02:15:01PM -0400, Greg Wooledge wrote:
> On Fri, Oct 21, 2022 at 08:01:00PM +0200, to...@tuxteam.de wrote:
> > On Fri, Oct 21, 2022 at 01:21:44PM -0400, Gary Dale wrote:
> > > I'm hoping someone can tell me what I'm doing wrong. I have a line in a
> > > lot
> > > of HTML fi
On Fri, Oct 21, 2022 at 08:01:00PM +0200, to...@tuxteam.de wrote:
> On Fri, Oct 21, 2022 at 01:21:44PM -0400, Gary Dale wrote:
> > I'm hoping someone can tell me what I'm doing wrong. I have a line in a lot
> > of HTML files that I'd like to remove. The line is:
> >
> >
> >
> > I'm t
On Fri, Oct 21, 2022 at 01:50:29PM -0400, Greg Wooledge wrote:
> On Fri, Oct 21, 2022 at 01:21:44PM -0400, Gary Dale wrote:
> > sed -i -s 's/\s*\//g' history.html
> >
> > Unfortunately, the replacement doesn't remove the line but rather leaves me
> > with:
> >
> > <;">
>
> The 's' c
On Fri, Oct 21, 2022 at 01:21:44PM -0400, Gary Dale wrote:
> I'm hoping someone can tell me what I'm doing wrong. I have a line in a lot
> of HTML files that I'd like to remove. The line is:
>
>
>
> I'm testing the sed command to remove it on just one file. When it works,
> I'll run
On Fri, Oct 21, 2022 at 01:21:44PM -0400, Gary Dale wrote:
> sed -i -s 's/\s*\//g' history.html
>
> Unfortunately, the replacement doesn't remove the line but rather leaves me
> with:
>
> <;">
The 's' command in sed doesn't remove lines. It performs a substitution
within a line.
T
13 matches
Mail list logo