Shell script generation command based on template
===

**What I want to achieve**  

 - User would provide a command which would do remote execution. Command (protocol for remote execution) can be SSH/RSH... etc. So I want it to be part of a configuration file or a template file (assume parameters are fixed across protocol) like below sample -   

template.cfg file (as configured by user):

    ssh $ip $commandList  


 - I would generate a list of values in another data file which would contain the ip address and the command list. Like  

    10.182.215.214|echo $UNAME  
    10.251.142.142|echo $SHELLNAME  

 - I would like to have a script call it `driver.sh` which when executed, generates the actual script/scripts with the command from template to another execution script - `execute.sh`   

**Questions**

 1. How can I generate the script based on template/plugin (which can take liberty and provide the command).  
 2. If the data is generated in an online application (C/C++), other than normal file based operation (read from the cfg file and update the `execute.sh` is there any better way?