Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG  Not logged in ELOG logo
Message ID: 69400     Entry time: Thu Oct 21 11:15:20 2021
Icon: Idea  Author: Andreas Luedeke  Author Email: andreas.luedeke@psi.ch 
Category: Request  OS: All  ELOG Version: 3.1.4 
Subject: How about string constants in config files? 

My config files are often large and use some shell scripting. In these shell scripting part I interact with files and execute scripts in specific folder.
It would be nice to have the ability to define for example a file path once and reuse it in different parts of the config file. It would help to make config files cleaner. For example:

Constant c_cid = "/usr/local/elog/logbooks/elog-campaignID.default"
Execute new = if ! [ -z "$CampaignID" ] ; then echo "$CampaignID" > $c_cid; fi

Preset CampaignID = $shell( if [ -r $c_cid ] ; then cat $c_cid; else echo None > $c_cid; echo None; fi )

ELOG V3.1.5-fe60aaf