[98501] in RedHat Linux List

home help back first fref pref prev next nref lref last post

Re: A script problem

daemon@ATHENA.MIT.EDU (Tim Hockin)
Mon Nov 9 13:27:46 1998

From: Tim Hockin <thockin@isunix.it.ilstu.edu>
To: redhat-list@redhat.com
Date: Mon, 9 Nov 1998 11:07:19 -0600 (CST)
In-Reply-To: <Pine.LNX.4.05.9811091555420.8047-100000@winbuster.magic.fr> from "Zoki" at Nov 9, 98 04:03:19 pm
Resent-From: redhat-list@redhat.com
Reply-To: redhat-list@redhat.com

try backquotes, not normal quotes.  `/usr/bin/id -un`

> if  [ '/usr/bin/id -un' = "zokiphoto" ]; then

this will always test false - you are testing if "/usr/bin/id -un" is the
same as "zokiphoto" - which obviously is false.  backquotes EXECUTE what is
inside them, then substitute the value.

Try that,

Tim


-- 
  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
		http://www.redhat.com http://archive.redhat.com
         To unsubscribe: mail redhat-list-request@redhat.com with 
                       "unsubscribe" as the Subject.


home help back first fref pref prev next nref lref last post