bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

sed 4.2.2 does not operate on streams when --follow-symlinks is passed


From: Luke T . Shumaker
Subject: sed 4.2.2 does not operate on streams when --follow-symlinks is passed
Date: Wed, 09 Jan 2013 00:50:32 -0500
User-agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.8 Emacs/24.2 (i686-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

sed 4.2.2 introduced the change from 4.2.1 that the
`--follow-symlinks` option breaks sed's ability to operate on
streams.

This option is clearly non-applicable in the situation of editing a
stream, but should not break in that situation.

This new behavior is an inconvenience to users who may have created
an alias for sed, as I have:
    alias sed='sed --follow-symlinks'

Version information:
    $ sed --version
    sed (GNU sed) 4.2.2
    Copyright (C) 2012 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later 
<http://gnu.org/licenses/gpl.html>.
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.
    
    Written by Jay Fenlason, Tom Lord, Ken Pizzini,
    and Paolo Bonzini.
    GNU sed home page: <http://www.gnu.org/software/sed/>.
    General help using GNU software: <http://www.gnu.org/gethelp/>.
    E-mail bug reports to: <address@hidden>.
    Be sure to include the word ``sed'' somewhere in the ``Subject:'' field.
    
Problem testcase:
    $ type sed
    sed is aliased to `sed --follow-symlinks'
    $ sed s/foo/bar/ <<<foo
    /bin/sed: cannot stat -: No such file or directory

    $ /bin/sed --follow-symlinks s/foo/bar/ <<<foo
    /bin/sed: cannot stat -: No such file or directory

Work-around 0:
    $ /bin/sed s/foo/bar/ <<<foo
    bar

Work-around 1:
    $ unalias sed
    $ sed s/foo/bar/ <<<foo
    bar

Happy hacking,
~ Luke Shumaker



reply via email to

[Prev in Thread] Current Thread [Next in Thread]