> I must admit, that I don't know the 'qt mywhich' combo. But may I ask
> why you don't use 'hash'?

mywhich() is a function in lib.common which (I guess) emulates the
behavior of 'which', and qt() is another function which send the
STDOUT and STDERR of a command to /dev/null. There are many instances
of 'qt mywhich' being used in lib.cli when there is a check for the
existence of an executable.

I was initially going to use 'command -v foo >/dev/null 2>&1' as
suggested by this page:

http://stackoverflow.com/questions/592620/check-if-a-program-exists-from-a-bash-script

but then decided to use 'qt mywhich' instead since I'd seen it used
many times already in 'lib.cli'.

The most popular answer in the Stack Overflow link above suggests that
using 'command -v' is POSIX compliant and would give more consistent
results than 'hash'.

Best regards,
-Martin

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk
_______________________________________________
Shorewall-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/shorewall-devel

Reply via email to