--- Andrew RAY
I thought you meant macro expansion, so, to take a different example, let's assume netscape is the application (usually placed in /opt/netscape/netscape, not usually on the $PATH).
Am I to assume that you meant type:
ssh -X root@localhost $(which netscape)
because the macro expansion fails, and you end up with a defaulted ssh session as the root user, hash prompt and all.
That is what would happen if $(which netscape) returned nothing, yes.
ssh -X root@localhost /opt/netscape/netscape
will, of course, work every time, however, and has the additional advantage that it can be included in that fashion in any shell-script, or as a short-cut on the desk-top etc.etc.
Oh, agreed. Even if netscape wasn't in /opt/netscape, it wouldn't take a genius to realise that all he has to do is change the location. The hard-coded form is perhaps more portable. In the old days "which" was actually an alias to "type -p". -- Thomas Adam ===== Thomas Adam "The Linux Weekend Mechanic" -- www.linuxgazette.com ________________________________________________________________________ Want to chat instantly with your online friends? Get the FREE Yahoo! Messenger http://mail.messenger.yahoo.co.uk