Why does it exist to variables that seems to do about the same job?

seb

On Tue, 3 Apr 2001, Thomas Mangin, Systems wrote:

> | > > if [ "$SECURE_TMP" = "yes" -o "$SECURE_TMP" = "1" -o "$SECURE_TMP" =
> "YES"
> | > > -o "$SECURE_TMP" > 3 ];then
> | > >
> | > > and I changed it to:
> | > >
> | > > if [ "$SECURE_TMP" = "yes" -o "$SECURE_TMP" = "1" -o "$SECURE_TMP" =
> "YES"
> | > > ];then
> | > >
> | > > not sure if this is correct, but now I don't get the "3" file showing
> up any
> | > > more.
> | >
> | > You should use:
> | > if [ "$SECURE_TMP" = "yes" -o "$SECURE_TMP" = "1" -o "$SECURE_TMP" =
> "YES"
> | > -o "$SECURE_TMP" -gt 3 ];then
> |
> | Nope.
> |
> | if [ "$SECURE_TMP" = "yes" -o "$SECURE_TMP" = "1" -o "$SECURE_TMP" = "YES"
> | -o "$SECURITY" -gt 3 ];then
> |
> | The SECURITY variable must be set in /etc/sysconfig/system, or else the
> | test will generate an error.
>
> Nope
>
> If you want to catch "yes", "YES", "Yes" as well as "YeS" and firends the
> best way is :
>
> SECURE_LOW=`echo "$SECURE_TMP" | tr [A-Z] [a-z]`
> if [ "$SECURE_LOW" = "yes" -o "$SECURE_LOW" = "1" -o "$SECURITY" -gt 3 ];
> then
>
> Ps : I have no idea what so ever of what the code look like and I guess you
> can add the tr to the SECURE_TMP directly.
>
> Thomas
>
>
>




Reply via email to