Without -P, a single source file is read; its name must be given exactly and need not end in .icn.
With -P, a small program can be embedded within a larger shell script. In this case the program argument is a complete Icon program, typically given as a multi-line quoted string.
Translation and linking is silent, suppressing progress messages, and undeclared identifiers are diagnosed. This mirrors the behavior of the icont command when run with -s and -u options.
An Icon source file can be made directly executable by setting the appropriate permission bits and beginning it with a shell header. If the first line of the file is #!/usr/bin/env icon then icon is found on the command search path and called to process the program upon execution.
The Icon Programming Language. Griswold and Griswold, Peer-to-Peer, third edition, 1996.
Graphics Programming in Icon. Griswold, Jeffery, and Townsend, Peer-to-Peer, 1998.
Version 9.4.1 of Icon.
http://www.cs.arizona.edu/icon/v941.