Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

incorrect sed substitutions for backreferences #52

Closed
rmyorston opened this issue Mar 14, 2016 · 1 comment
Closed

incorrect sed substitutions for backreferences #52

rmyorston opened this issue Mar 14, 2016 · 1 comment

Comments

@rmyorston
Copy link
Owner

From upstream BusyBox Bugzilla (#8791):

  $cat myfile
  a
  b
  c
  $sed "s/\(.*\)/\1\1/" myfile
  a
  b
  c

it should be :

  $sed "s/\(.*\)/\1\1/" myfile
  aa
  bb
  cc

used once \1 worked as expected but when repeated it does not.

@rmyorston
Copy link
Owner Author

As I've mentioned in the upstream bug report the problem is that busybox-w32 keeps the CR of the CRLF line terminator and it ends up in the matched string. This seems wrong on Microsoft Windows and has been fixed in commit 3ebb829.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant