Switch Statement with File Parameter
suggest changeThe -file
parameter allows the switch statement to receive input from a file. Each line of the file is evaluated by the switch statement.
Example file input.txt
:
condition
test
Example switch statement:
switch -file input.txt
{
'condition' {'First Action'}
'test' {'Second Action'}
'fail' {'Third Action'}
}
Output:
First Action
Second Action
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents