Saturday, 15 September 2012

linux - Wrap/overwrite function in Bash -



linux - Wrap/overwrite function in Bash -

how rewrite echo print character before pass it?

i thinking not work:

alias oldecho=echo echo(){oldecho ==> $1}

close.

echo() { builtin echo "==>" "$@"; }

builtin forces rest of command executed builtin, simplifies reimplementing builtins.

your problem, though, not quoting >.

linux bash shell

No comments:

Post a Comment