Script useage
1. how create a cmd script
A terminal Agent script is like a combination of INI and shell script. The script contains following elements.
1.1 [INPUT] section
[INPUT] is the section to indicate the inputs of the script Below is a example to define a input ,name is date1 and value is 2025-01-01
[INPUT]
date1=2025-01-01
1.2 [CONFIG] section
[CONFIG]is the section to store values Below is an example to define default value my_birthday in CONFIG section
[INPUT]
date1={my_birthday}
[CONFIG]
my_birthday=2025-01-01
1.3 script section
[CMD] is the section contain windows command line script [WSL] is the section contain WSL shell scripts [SHELL] is the section to contain linux shell sccript [PS] is the section to contain power shell sccript
A example to define a WSL script,it will echo 2025-01-01 in the console.
[INPUT]
date1={my_birthday}
[CONFIG]
my_birthday=2025-01-01
[WSL]
echo {date1}
1.4 file section
Below show an example to create a sub file run.sh,it will echo 2025-01-01 in the console.
[INPUT]
date1={my_birthday}
[CONFIG]
my_birthday=2025-01-01
[WSL]
source run.sh
[FILE__run.sh]
echo {date1}
1.5 To define a value
Below is a example,it defines a date1 value in the INPUT
[INPUT]
date1=2025-01-01
1.6 nesting value
Below is a example of nesting value, the example echo a HelloWorld
[INPUT]
value1=Hello
value2={value1}World
[CMD]
echo {value2}
1.7 Keywords
Keywords is a uppper name for a certain feature. Below list all keywords.
[CONFIG]
PROJECT=the_project_name
NAME=the_outputname
1.8 presets value
presets value is a pre settled value, it can be used in the script
{DATE} is to indicate the date of today
value1={DATE}
the outputs name of the scripts.
value1={TIME}