I wanted to look at a file and figured why not pipe the output of which to more, which of course didn't work so I figured if I backticked the which output with more in front that would work, and apparently it does (though I'm not sure that the cmd itself wasn't executed?).
e.g. more `which apachectl`
Is this a reasonable way to get what I'm after, or a bad thing?
It's fine, although anything inside the ticks does in fact get executed, eg
expands to /usr/local/bin/apachectl (not running apache, don't remember the freebsd location offhand but you get the point)
so then the literal text '/usr/local/bin/apachectl' replaces the command inside the ticks to become:
So yep, it's doing what you want, the way you wanted to...use something similar fairly often myself, although note that the 'current' standard for executing commands is now $(cmd), eg
more $(which apachectl)
_______________________________________________ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"