Menu

specification files

Chris DeGreef

The command-line that Argument processes can be saved in a file instead of being typed. This is useful for an often used command-line in order to reduce the amount of typing. We will use an example from Funnel to show how this might be used.

Arguments --eol and --eolOut are multi-value byte types. --replace is a boolean type. --copy is an enum type. And "myText" is the value for a positional argument. The purpose of this command-line is to copy the myFile.txt file back to itself and add line-feeds to the end of every line. A common name for this process is unix2dos.

> funnel --eol cr --eolOut cr,lf --replace --copy original myFile.txt

So we can create a file call unix2dos that contains the common part for any file you might want to convert. Here we use echo to make the file and pipe it to the unix2dos name.
> echo "--eol cr --eolOut cr,lf --replace --copy original" > unix2dos

Now we can use unix2dos in our Funnel commands.
> funnel @unix2dos myFile.txt

Specification files can be embedded within each other. So it is possible to have an @filename parameter in another @filename file. Recursion is not allowed and must be avoided.


Related

Wiki: Compiling

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.