On Thu, 2005-02-10 at 22:32 -0800, Jeremy C. Reed wrote:
> On Thu, 10 Feb 2005, Craig White wrote:
>
> > if $USERADMIN_ACTION=ADD_USER; then
>
> A couple problems.
>
> Add spaces around the equal sign.
>
> But then the shell will still evaluate and run the first value.
>
> Use test or [.
>
> man [
>
> if [ "${USERADMIN_ACTION}" = "ADD_USER" ]; then
----
I guess I'm not so embarrassed after all, my O'Reilly Bash book doesn't
seem to cover those details.
I get the [ ] for the test
I don't get the braces around the variable but it definitely works
Now - my last problem
if you recall, I am 'exec' a perl file but the variable $LDAPADMIN_USER
isn't getting passed to it. I thought that if I used exec
exec '/root/scripts/ldap_useradmin.delmail.pl'
instead of just
/root/scripts/ldap_useradmin.delmail.pl
it would get passed automatically. I added a line
export $LDAPADMIN_USER
but still no go
what am I missing here?
Thanks
Craig
---------------------------------------------------
PLUG-discuss mailing list -
PLUG-discuss@lists.plug.phoenix.az.us
To subscribe, unsubscribe, or to change you mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss