The -i input parameter gives the file to take input from (default standard input).
The -f file parameter must be given before the list of IP addresses.
The spec parameter is the IP addresses that go to the file in question. It is of the form start[-end][:start[-end]] where start and end specify the start and ends of ranges of IPs. Also the CIDR notation can be used or a single IP address. If there is a large number of IP ranges then a file name can be given which contains a set of IP ranges, one range per line.
1 Bad parameters
2 Can't open input
3 Can't open/write to output file
4 Can't open and read from spec file