Logic for handling the various output formats that fif can output to.
PowerShell script.
Bourne-Shell compatible script.