Re: sed "Hello, world!" program?

Paolo Bonzini <[email protected]>
Newsgroups gmane.editors.sed.user
Message-ID <[email protected]>
Il 21/02/2014 19:47, [email protected] ha scritto:
> 4) It does not rely on "echo" or other non-sed command (that may not be
> present). It makes it's own input, whatever text --version happens to
> produce. Maybe some sed versions may not have --version option? But it
> is a standard command line option, so I think it is fine for this purpose.
>

What if some sed versions have a --version that writes to stderr rather 
than stdout?  In fact it is not a standard option, and an unrecognized 
option would write a message to stderr, not stdout.  So you need a 2>&1.

Paolo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.