Types, shells, echoes and other phenomena ? [ was: Re: dapper sudo ]
Erik Christiansen
erik at dd.nec.com.au
Thu Jul 6 07:16:34 UTC 2006
On Wed, Jul 05, 2006 at 08:21:58PM +1000, Peter Garrett wrote:
> So... I'm more confused than I was now :) Are there two "echoes" ? ( An
> echo of an echo perhaps ?
>
> Echo...echo...echo...echo.... ( fading out as it bouces between the
> mountains..... )
Peter,
I suspect that you suspect that the echoes are illusory, and you're
right. In fact, it's just a case of which which is which:
$ which which
which is aliased to `type' # In my .bashrc for the last decade or
# two, 'cos some unices lacked which.
$ unalias which
$ which which
/bin/which # Oooh!, there is one in ubuntu.
But /bin/which merely locates the first occurrence of the command in
$PATH, which is not the whole story in a bash shell. type gives a more
'truthful' answer. (I begin to like my alias more, by the minute. :-)
As an aside, I suppose that for the OP, it is moot which echo is which,
because /bin/echo also outputs a trailing newline if -n is not
specified, so neither would inherently substitute for /dev/null.
:-)
Erik
More information about the ubuntu-users
mailing list