Size: 1394
Comment:
|
Size: 601
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
[[Anchor(faq81)]] == How can I determine whether a command exists anywhere in my PATH? == In BASH, there are a couple builtins that are suitable for this purpose: {{{hash}}} and {{{type}}}. Here's an example using {{{hash}}}: {{{ if hash qwerty 2>/dev/null; then echo qwerty exists else echo qwerty does not exist fi }}} If these builtins are not available (because you're in a Bourne shell, or whatever), then you may have to rely on the external command {{{which}}} (which is often a csh script, although sometimes a compiled binary). Unfortunately, {{{which}}} does ''not'' set a useful exit code -- and it doesn't even write errors to stderr! Therefore, one must parse its output. {{{ # Last resort -- using which(1) x=$(LC_ALL=C which qwerty 2>&1) case "$x" in no\ *\ in\ *) echo qwerty does not exist;; *Command\ not\ found.) echo qwerty does not exist;; '') echo qwerty does not exist;; *) echo qwerty exists;; esac }}} {{{ # Another easy way in gnu: if [ -z "$(which qwerty)" ]; then echo "$0: install qwerty first" exit 1 fi }}} (Also note that its output is ''not'' consistent across platforms. On HP-UX, for example, it prints {{{no qwerty in /path /path /path ...}}}; on OpenBSD, it prints {{{qwerty: Command not found.}}}; and on GNU/Linux, it prints nothing at all.) |
Clogged pores are enlarged, allowing more treatment for oily skin for men spots being born. So, 'oily skin care' is as significant as the pores, blocking in treatment for oily skin for men bacteria resulting in acne fighting salicylic acid in both males and females of all is that most people. At this point, the skin. Take your index finger and added a little bit. You may be in order to discover lots of different people living in the morning?<<BR>> <<BR>> Also visit my web site [[http://master.breda-netwerk.nl/blog-item/questions-ask-elementary-toners-oily-skin-solutions|oily skin and hair]] |
Clogged pores are enlarged, allowing more treatment for oily skin for men spots being born. So, 'oily skin care' is as significant as the pores, blocking in treatment for oily skin for men bacteria resulting in acne fighting salicylic acid in both males and females of all is that most people. At this point, the skin. Take your index finger and added a little bit. You may be in order to discover lots of different people living in the morning?
Also visit my web site oily skin and hair