[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Possible bug with grep/sed/tail?
From: |
Paolo Bonzini |
Subject: |
Re: Possible bug with grep/sed/tail? |
Date: |
Fri, 21 Nov 2008 13:52:22 +0100 |
User-agent: |
Thunderbird 2.0.0.18 (Macintosh/20081105) |
> But if the shared library is installed, you can
> instead use your own line-buffer function:
>
> line-buffer()
> {
> LD_PRELOAD=/t/linebuf.so "$@"
> }
>
> but that doesn't expand the command name when it's an alias or function.
It actually works for functions. To support aliases, you can do
preload() {
local so cmd
so=$1
cmd=$2
shift 2
case x`type -t "$cmd"` in
xalias) eval LD_PRELOAD=\$so $cmd \"address@hidden" ;;
*) LD_PRELOAD=$so "$cmd" "$@" ;;
esac
}
alias line-buffer='preload /t/linebuf.so'
Paolo
- Possible bug with grep/sed/tail?, David Corlette, 2008/11/20
- Re: Possible bug with grep/sed/tail?, Paolo Bonzini, 2008/11/20
- Re: Possible bug with grep/sed/tail?, Pádraig Brady, 2008/11/20
- Re: Possible bug with grep/sed/tail?, Brian Dessent, 2008/11/20
- Re: Possible bug with grep/sed/tail?, Jim Meyering, 2008/11/21
- Re: Possible bug with grep/sed/tail?, Reuben Thomas, 2008/11/21
- Re: Possible bug with grep/sed/tail?,
Paolo Bonzini <=
- Re: Possible bug with grep/sed/tail?, Andreas Schwab, 2008/11/21
- Re: Possible bug with grep/sed/tail?, Jim Meyering, 2008/11/21
- Re: Possible bug with grep/sed/tail?, Jim Meyering, 2008/11/22
- Re: Possible bug with grep/sed/tail?, Pádraig Brady, 2008/11/22
- Re: Possible bug with grep/sed/tail?, Jim Meyering, 2008/11/22
- Re: Possible bug with grep/sed/tail?, Brian Dessent, 2008/11/22
- Re: Possible bug with grep/sed/tail?, Jim Meyering, 2008/11/29
- Re: Possible bug with grep/sed/tail?, Pádraig Brady, 2008/11/30
- Re: Possible bug with grep/sed/tail?, Pádraig Brady, 2008/11/24
- Re: Possible bug with grep/sed/tail?, Jim Meyering, 2008/11/24