gretlcli

gretlcli

— Opens the program and waits for user input.

gretlcli datafile

— Starts the program with the specified datafile in its workspace. The data file may be in native gretl format, CSV format, or BOX1 format (see Chapter 4). The program will try to detect the format of the file and treat it appropriately. See also the Section called Path searching for path-searching behavior.

gretlcli --help (or gretlcli -h)

— Prints a brief summary of usage.

gretlcli --version (or gretlcli -v)

— Prints version identification for the program.

gretlcli --pvalue (or gretlcli -p)

— Starts the program in a mode in which you can interactively determine p-values for various common statistics.

gretlcli --run scriptfile (or gretlcli -r scriptfile)

— Execute the commands in scriptfile then hand over input to the command line. See the Section called Path searching for path-searching behavior.

gretlcli --batch scriptfile (or gretlcli -b scriptfile)

— Execute the commands in scriptfile then exit. When using this option you will probably want to redirect output to a file. See the Section called Path searching for path-searching behavior.

When using the --run and --batch options, the script file in question must call for a data file to be opened. This can be done using the open command within the script. For backward compatibility with Ramanathan's original ESL program another mechanism is offered (ESL doesn't have the open command). A line of the form:

 
	(* ! myfile.gdt *)
will (a) cause gretlcli to load myfile.gdt, but will (b) be ignored as a comment by the original ESL. Note the specification carefully: There is exactly one space between the begin comment marker, (*, and the !; there is exactly one space between the ! and the name of the data file.

One further kludge enables gretl and gretlcli to get datafile information from the ESL "practice files" included with the gretl package. A typical practice file begins like this:

(* PS4.1, using data file DATA4-1, for reproducing Table 4.2 *)

This algorithm is used: if an input line begins with the comment marker, search it for the string DATA (upper case). If this is found, extract the string from the D up to the next space or comma, put it into lower case, and treat it as the name of a data file to be opened.