[Top][All Lists]

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

Re: Condition evaluation removed

From: Ralf Wildenhues
Subject: Re: Condition evaluation removed
Date: Thu, 11 Sep 2008 22:33:11 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

Hello Giles,

* Giles Anderson wrote on Thu, Sep 11, 2008 at 05:45:38PM CEST:
> Is there a way to populate the file output from my '.in' file with only the
> result of a condition evaluation not the condition itself?


> So my file looks like:
> ============
> export address@hidden@
> if [ $(hostname|cut -d. -f1) = "$(echo ${SCHED_HOST} |cut -d. -f1)" ]
> then
>    export ORAENV_ASK=NO
>    export ORACLE_SID=SID1
>    source oraenv
> fi

> And I would like the resulting dev.ini to look like this if the above is
> true:
> export ORAENV_ASK=NO
> export ORACLE_SID=SID1
> source oraenv

What would you like it to contain if the above is not true?  If
ORAENV_ASK is YES in that case, for example, you can put
  export address@hidden@

in the .in file and set $ORAENV_ASK in, and AC_SUBST it.
If you would like the file to be completely empty, then you can use
something like

and use something like AC_SUBST([SET_ORAENV_ASK], [export ORAENV_ASK=NO])
in  Autoconf versions 2.62 and newer also allow to
substitute multiline values, so you can also do something like
    export ORAENV_ASK=NO
    export ORACLE_SID=SID1
    source oraenv"

and put @SET_AND_SOURCE_ORAENV@ in your .in file.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]