[aklug] Re: Linux certification

From: Leif Sawyer <lsawyer@gci.com>
Date: Mon Nov 30 2009 - 16:12:39 AKST

Mike Tibor writes:
> Using those examples I would then write simple little scripts
> to verify that my understanding of something was correct.
> For example, for if/then things I might've done something like:
>
> #!/bin/sh
> TEST=3D"yes"
> #TEST=3D"no"
> if [ "$TEST" =3D "yes" ]; then
> echo "Yes"
> else
> echo "No"
> fi

or, for a fun bashism:

#!/bin/bash

TEST=3D"Oh, yes, please"
if [ -z "${TEST##*yes*}" ]; then
        echo "Yes"
else
        echo "No"
fi

---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
Received on Mon Nov 30 16:13:10 2009

This archive was generated by hypermail 2.1.8 : Mon Nov 30 2009 - 16:13:10 AKST