Conditional define in execline
Hi,
Is there an elegant way to achieve a conditional define? something like
this:
if (test)
A = 0
else
A = 1
do something with A :-)
More or less this is what I tried, and it works:
export fn "\
ifelse { test }
{
define A 0
\\$_at_
}
define A 1
\\$_at_"
execlineb -S0 -c ${fn}
s6-echo ${A}
But...I firmly believe that there is a much more elegant way to do this!
Thanks,
Received on Fri Mar 20 2015 - 19:21:14 UTC
This archive was generated by hypermail 2.3.0
: Sun May 09 2021 - 19:38:49 UTC