I am using Caliber Interactive to get the list of environment variables. However I am looking for batch mode way to get the list. Is it already supported? How to use it?
Are you thinking of listing the current state of just the environment variables that are referenced by the rule file, or were you thnking of all variables that exist in the environment regardless of their use in the rule file?
For the first one we might investigate to see if there is a Calibre specific way to do it.
For the second, we might consider using a unix/Linux shell capability.
Thanks for your quick reply. I am looking for the environment variables referenced in the rule file only. - just like the table I get through Calibre Interactive. Is it possible?
This works for me in a small test on my own rule file. Interested to see if it works for you too:
% cat freeze.txt
% $MGC_HOME/bin/calibre -svrf rules < freeze.txt > log.svrf.freeze ; grep "^#PRAGMA ENV" rules.env
hmmm... maybe a bit of bad news... I've been testing that more extensively and I found there is a glitch when the environment variables aren't actually defined. In other words, if all the environment variables are defined in the shell then the process I described should work, but if any of the environment variables used by the rule file aren't actually defined (or if they are empty) then the technique I described doesn't work.
I tried with it. However, I didn't get any result from grep as well. If it is too complicated, don't waste too much time, I can just write a script to do it.
Retrieving data ...