[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Quick Bash question

On Fri, Jan 03, 2003 at 12:22:14AM -0800, Bill Moseley wrote:
> In a shell script does:
> do anything special besides set $MODPROBE to ":"?


>     MODPROBE=:
>             debug_mesg Looking for module $MODULE with modprobe=$MODPROBE
>             if $MODPROBE -n $MODULE >/dev/null 2>&1 &&
>                     ! $MODPROBE $MODULE >/dev/null 2>&1 ; then

':' is another name for 'true', which ignores all its arguments and
returns true. It's often used as a substitute for a program that wasn't
found on the build system or as a way to temporarily disable something.
Since 'true && ! true' is false, that's why you're seeing this

It's possible that it's intentional; I don't know. If you have a
problem, it's probably best to file a bug.

Colin Watson                                  [cjwatson@flatline.org.uk]

Reply to: