[Bug 253893] sed "/^\s*$/d" complains about trailing backslash (\)

2024-03-19 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253893

Elijah Nelson  changed:

   What|Removed |Added

 CC||elijahnelso...@gmail.com

--- Comment #23 from Elijah Nelson  ---
To fix this issue, you can try modifying the second sed command to use a
different pattern that achieves the same result without relying on \s, which
might not be recognized properly in the newer version of sed.
https://mapsdrivingdirections.io

-- 
You are receiving this mail because:
You are the assignee for the bug.


[Bug 253893] sed "/^\s*$/d" complains about trailing backslash (\)

2024-03-24 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253893

Sara Adam  changed:

   What|Removed |Added

 CC||saramadam...@gmail.com

--- Comment #24 from Sara Adam  ---
I have been researching this software and the errors that users often
encounter, I realized that many people make the same mistakes as you.
https://slitherio.online

-- 
You are receiving this mail because:
You are the assignee for the bug.


[Bug 253893] sed "/^\s*$/d" complains about trailing backslash (\)

2024-03-24 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253893

--- Comment #25 from crb  ---
The comment from Sara Adam spam, don't follow the link

-- 
You are receiving this mail because:
You are the assignee for the bug.


[Bug 253893] sed "/^\s*$/d" complains about trailing backslash (\)

2021-02-27 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253893

Bug ID: 253893
   Summary: sed "/^\s*$/d" complains about trailing backslash (\)
   Product: Base System
   Version: 13.0-STABLE
  Hardware: amd64
OS: Any
Status: New
  Severity: Affects Some People
  Priority: ---
 Component: bin
  Assignee: b...@freebsd.org
  Reporter: free...@schukraft.org

After an upgrade from 12.2 to 13.0-BETA3, python's virtualenvwrapper stopped
working with a sed error. Source seems to be a pipeline akin to this:

> echo test/bin/activate | tr "\n" " " |  sed "s|/bin/activate |/|g" | tr "/" 
> "\n" | sed "s/^\s*$/d"
sed: 1: "/^\s*$/d": RE error: trailing backslash (\)

If I mount the 12.2 boot environment and replace the sed calls in the above
with /tmp/be/usr/bin/sed, it works, as it has on 12.2:

> echo test/bin/activate | tr "\n" " " |  /tmp/be_mount.6Hlw/usr/bin/sed 
> "s|/bin/activate |/|g" | tr "/" "\n" | /tmp/be_mount.6Hlw/usr/bin/sed 
> "/^\s*$/d"
test

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


[Bug 253893] sed "/^\s*$/d" complains about trailing backslash (\)

2021-02-27 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253893

Yuri Pankov  changed:

   What|Removed |Added

 CC||yur...@freebsd.org

--- Comment #1 from Yuri Pankov  ---
Note that while the bug is actual, there is an error in your reproducer, `sed
"s/^\s*$/d"` is wrong, there should not be an 's' command at the beginning.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


[Bug 253893] sed "/^\s*$/d" complains about trailing backslash (\)

2021-02-27 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253893

Kyle Evans  changed:

   What|Removed |Added

 CC||kev...@freebsd.org

--- Comment #2 from Kyle Evans  ---
(In reply to freebsd from comment #0)

Regardless of how 13 ends up, you should patch this to replace \s with
[[:space:]]. This expression is not doing what the authors intended it to do on
any other version of FreeBSD, and the new logic is only pointing that out.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


[Bug 253893] sed "/^\s*$/d" complains about trailing backslash (\)

2021-02-27 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253893

David Schlachter  changed:

   What|Removed |Added

 CC||fbsd-bugzi...@schlachter.ca

--- Comment #3 from David Schlachter  ---
A simpler test case is just:

printf "\n\n\n\n" | sed "/^\s*$/d"

Expected behaviour is that the empty lines will be filtered out.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


[Bug 253893] sed "/^\s*$/d" complains about trailing backslash (\)

2021-02-27 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253893

--- Comment #4 from David Schlachter  ---
I believe the error is raised in p_simp_re() in
/usr/src/lib/libc/regex/regcomp.c.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


[Bug 253893] sed "/^\s*$/d" complains about trailing backslash (\)

2021-02-27 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253893

--- Comment #5 from Kyle Evans  ---
(In reply to David Schlachter from comment #4)

Indeed, the error is quite intentional and to catch unexpected behavior like
this.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


[Bug 253893] sed "/^\s*$/d" complains about trailing backslash (\)

2021-02-27 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253893

--- Comment #6 from free...@schukraft.org ---
(In reply to Kyle Evans from comment #5)
Do you mean this is expected behaviour now? Because from a user's point of
view, this error message is rather unhelpful: what trailing backslash?

I can report that changing \s to [[:space:]] is working.
So how to proceed? Should I report this to virtualenvwrapper's upstream? Should
the port maintainer add a patch?

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


[Bug 253893] sed "/^\s*$/d" complains about trailing backslash (\)

2021-02-27 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253893

--- Comment #7 from Kyle Evans  ---
(In reply to freebsd from comment #6)

Yes, the message leaves a lot to be desired, unfortunately; I've not yet been
able to study the impact of changing the message since this reused a
preexisting "escape error" condition.

Indeed, ideally this would both go upstream and to the local port maintainer as
a POSIX compliance issue.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


[Bug 253893] sed "/^\s*$/d" complains about trailing backslash (\)

2021-04-20 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253893

Andreas Sommer  changed:

   What|Removed |Added

 CC||andreas.sommer87@googlemail
   ||.com

--- Comment #8 from Andreas Sommer  ---
`\s` is very much a de-facto standard and should remain supported in 13.x –
even if it's not written down in POSIX. GNU sed also has this, and the more
their feature sets drift apart, the more annoying any cross-platform scripting
becomes.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


[Bug 253893] sed "/^\s*$/d" complains about trailing backslash (\)

2021-04-20 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253893

--- Comment #9 from Kyle Evans  ---
(In reply to Andreas Sommer from comment #8)

\s isn't supported in FreeBSD versions < 13.x, either, so this isn't a "remain
supported" but "let's support this." As I noted previously, it doesn't do what
you think it does in earlier versions.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


[Bug 253893] sed "/^\s*$/d" complains about trailing backslash (\)

2021-06-11 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253893

John Doe  changed:

   What|Removed |Added

 CC||gfpui...@m.t.kajt.de

--- Comment #10 from John Doe  ---
\s has worked for me pre FreeBSD 13.0. You claim that it did not actually do
what I thought it would to but it *did* in fact match whitespace characters.

It surely looks like a regression to me.

-- 
You are receiving this mail because:
You are the assignee for the bug.


[Bug 253893] sed "/^\s*$/d" complains about trailing backslash (\)

2021-06-11 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253893

--- Comment #11 from Ed Maste  ---
GNU sed:

$ echo 'a b' | gsed 's/\s/-space-/g'
a-space-b

FreeBSD 11:

$ echo 'a b' | sed 's/\s/-space-/g' 
a b

FreeBSD 12:

$ echo 'a b' | sed 's/\s/-space-/g' 
a b

FreeBSD 13:

$ echo 'a b' | sed 's/\s/-space-/g'
sed: 1: "s/\s/-space-/g": RE error: trailing backslash (\)

-- 
You are receiving this mail because:
You are the assignee for the bug.


[Bug 253893] sed "/^\s*$/d" complains about trailing backslash (\)

2021-06-11 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253893

--- Comment #12 from Ed Maste  ---
(In reply to David Schlachter from comment #3)
> printf "\n\n\n\n" | sed "/^\s*$/d"

Note that this is not actually testing \s since we're matching 0 or more. For
example, try (on 12.x or earlier):

$ printf "\n\n\n\n" | sed "/^x*$/d"

This also deletes the blank lines. Or, try:

$ printf " \n \n \n \n" | sed "/^\s*$/d"

and observe that the except-for-whitespace empty lines are not stripped.

-- 
You are receiving this mail because:
You are the assignee for the bug.


[Bug 253893] sed "/^\s*$/d" complains about trailing backslash (\)

2023-01-30 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253893

Quanah Gibson-Mount  changed:

   What|Removed |Added

 CC||quanah.gibsonmo...@gmail.co
   ||m

--- Comment #19 from Quanah Gibson-Mount  ---
This also broke the OpenLDAP test suite when running on FreeBSD 13:

Testing account lockout...
sed: 1: "s/.*seconds_before_unlo ...": RE error: trailing backslash (\)
ldapsearch failed (49)!


Affected line is:

DELAY=`echo "$DELAYATTR" | sed -n -e 's/.*seconds_before_unlock=\(\d*\)/\1/p'`

-- 
You are receiving this mail because:
You are the assignee for the bug.


[Bug 253893] sed "/^\s*$/d" complains about trailing backslash (\)

2023-01-30 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253893

--- Comment #20 from Quanah Gibson-Mount  ---
(In reply to Quanah Gibson-Mount from comment #19)

Note: fixed by using [[:digit:]] in OpenLDAP instead following the standard.

-- 
You are receiving this mail because:
You are the assignee for the bug.


[Bug 253893] sed "/^\s*$/d" complains about trailing backslash (\)

2023-01-30 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253893

--- Comment #21 from Kyle Evans  ---
(In reply to Quanah Gibson-Mount from comment #20)

Thanks; [[:digit:]] is indeed preferred, though I didn't know about \d when I
implemented these extensions in libregex so I'll need to add that one to the
list to support.

-- 
You are receiving this mail because:
You are the assignee for the bug.


[Bug 253893] sed "/^\s*$/d" complains about trailing backslash (\)

2023-01-30 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253893

--- Comment #22 from Kyle Evans  ---
(In reply to Kyle Evans from comment #21)

\d doesn't actually seem to be supported in GNU sed, either?

% echo "n9ne" | sed -e 's/\d/x/' 
n9ne
% sed --version
sed (GNU sed) 4.8

It's just that they're not as strict as we now are about bogus escapes, so this
was a hidden bug.

-- 
You are receiving this mail because:
You are the assignee for the bug.


[Bug 253893] sed "/^\s*$/d" complains about trailing backslash (\)

2021-10-07 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253893

--- Comment #13 from free...@schukraft.org ---
So far, neither the port maintainer nor upstream have reacted to this issue.
Effectively, the port is broken as-is, but the fix is a simple one line change
in virtualenvwrapper.sh (replace \s with [[:space:]] in sed). Could someone
with commit rights to the ports do that?

-- 
You are receiving this mail because:
You are the assignee for the bug.


[Bug 253893] sed "/^\s*$/d" complains about trailing backslash (\)

2022-02-17 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253893

Kubilay Kocak  changed:

   What|Removed |Added

   See Also||https://bugs.freebsd.org/bu
   ||gzilla/show_bug.cgi?id=2620
   ||20

-- 
You are receiving this mail because:
You are the assignee for the bug.


[Bug 253893] sed "/^\s*$/d" complains about trailing backslash (\)

2022-02-17 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253893

Kubilay Kocak  changed:

   What|Removed |Added

   Keywords||needs-qa
 Status|New |Open
  Flags||maintainer-feedback?(kevans
   ||@freebsd.org)

--- Comment #14 from Kubilay Kocak  ---
(In reply to Kyle Evans from comment #5)

What is the change required to resolve this issue as reported? Works as
Intended / Not A Bug, or potentially improve messaging, or something else, and
track that here?

-- 
You are receiving this mail because:
You are the assignee for the bug.


[Bug 253893] sed "/^\s*$/d" complains about trailing backslash (\)

2022-02-17 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253893

--- Comment #15 from Kyle Evans  ---
(In reply to Kubilay Kocak from comment #14)

Ideally someone should fix virtualenvwrapper to use a POSIX-conformant
expression like I described back in comment 2.

-- 
You are receiving this mail because:
You are the assignee for the bug.


[Bug 253893] sed "/^\s*$/d" complains about trailing backslash (\)

2022-02-17 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253893

Tatsuki Makino  changed:

   What|Removed |Added

 CC||tatsuki_mak...@hotmail.com

--- Comment #16 from Tatsuki Makino  ---
By the way, has that been taken into account for the handling of backslashes on
sh side?

echo a\ b | sed s/\\s/-space-/g

-- 
You are receiving this mail because:
You are the assignee for the bug.


[Bug 253893] sed "/^\s*$/d" complains about trailing backslash (\)

2022-05-14 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253893

crb  changed:

   What|Removed |Added

 CC||c...@chrisbowman.com

--- Comment #17 from crb  ---
Reading this thread it seems that \s (and I note also \S) isn't supported by
our sed whereas they are supported as whitespace and not whitespace in GNU sed.
 While one could work around this, as has been suggested preciously, would it
be a good idea to support this?  Are there other escape sequences that GNU sed
supports that we don't?  If patches that support these GNUisms were submitted
and were not otherwise objectionable would they be likely to be committed?

-- 
You are receiving this mail because:
You are the assignee for the bug.


[Bug 253893] sed "/^\s*$/d" complains about trailing backslash (\)

2022-05-14 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253893

--- Comment #18 from Kyle Evans  ---
(In reply to crb from comment #17)

It's a one-liner to link sed against libregex instead of libc regex, bringing
it up to parity with grep (i.e., \w, \W, \s, \S, \b, \B) -- the problem is that
it might break a lot of things, it adds repetition operators to BREs that
weren't previously there. If someone bogusly escaped one in the past that
suddenly gets special behavior, we have to fix that.

-- 
You are receiving this mail because:
You are the assignee for the bug.