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

Bug: using i\, a\ or c\ at EOF #54

Open
aureliojargas opened this issue Nov 16, 2019 · 3 comments
Open

Bug: using i\, a\ or c\ at EOF #54

aureliojargas opened this issue Nov 16, 2019 · 3 comments
Labels

Comments

@aureliojargas
Copy link
Owner

$ cat bug.sed
i\
$ ./sedsed.py -f bug.sed 

$ ./sedsed.py -e 'i\'

$

The i command was ignored in both -e and -f.

@aureliojargas
Copy link
Owner Author

Fixed by the new sedparse parser, see #52.

$ cat bug.sed
i\
$ ./sedsed.py -f bug.sed 
i\

$ ./sedsed.py -e 'i\'
i\

$

@aureliojargas
Copy link
Owner Author

aureliojargas commented Nov 16, 2019

Mmmm, but that extra blank line in the output does not seem right.

Indeed, when running the debug, it is adding an extra blank line that it shouldn't:

$ seq 5 | sed -e '3i\'
1
2
3
4
5
$ seq 5 | ./sedsed.py -d -e '3i\' --hide=patt,hold,comm
1
2

3
4
5
$

When the i command is not at EOF, it works as expected:

$ seq 5 | ./sedsed.py -d -e '3i\' -e foo --hide=patt,hold,comm
1
2
foo
3
4
5
$

@aureliojargas aureliojargas changed the title Using i\, a\ or c\ at EOF is not supported Bug: using i\, a\ or c\ at EOF Nov 16, 2019
@aureliojargas
Copy link
Owner Author

It seems it is a bug in sedparse, see aureliojargas/sedparse#2

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

No branches or pull requests

1 participant