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

We need sed -n ? #38

Closed
hemanth opened this issue Oct 25, 2012 · 3 comments
Closed

We need sed -n ? #38

hemanth opened this issue Oct 25, 2012 · 3 comments

Comments

@hemanth
Copy link

hemanth commented Oct 25, 2012

Some like sed('-n','/FOO/,/BAR/p',cat("cats.txt"));
says sed: option not recognized: n

@nfischer
Copy link
Member

This seems like a reasonable addition. @hemanth if you're able to submit a PR, I'd be happy to take a look.

@hemanth
Copy link
Author

hemanth commented Jan 10, 2016

I don't even recall why I had created this issue!

Anyway,

By default, each line of input is echoed to the standard output after all of the commands have been applied to it. The -n option suppresses this behavior.

Let see what best I can do here.

@nfischer
Copy link
Member

I'm going to go ahead and close this, since it doesn't seem that useful. It looks like this would only mean that a sed() call returns the empty string. A suitable workaround would be to just ignore the return value instead.

If other sed modes get supported, like the /p mode, then we can revisit this. Feel free to open this if there's some use-case I'm overlooking.

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

No branches or pull requests

3 participants