Switch Statement with File Parameter

suggest change

The -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

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents