## "Fossies" - the Fresh Open Source Software Archive

### Member "gretl-2020e/doc/tex/cli.tex" (1 Mar 2016, 2662 Bytes) of package /linux/misc/gretl-2020e.tar.xz:

As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) TeX and LaTeX source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 \chapter{The command line interface}
2 \label{chap:cli}
3
4 The gretl package includes the command-line program \app{gretlcli}.
5 On Linux it can be run from a terminal window (xterm, rxvt, or
6 similar), or at the text console.  Under MS Windows it can be run in a
7 console window (sometimes inaccurately called a DOS box'').
8 \app{gretlcli} has its own help file, which may be accessed by typing
9 help'' at the prompt. It can be run in batch mode, sending output
11
13 automatically the case in the MS Windows version; also see
14 Appendix~\ref{app-build}), the command line is recallable and
15 editable, and offers command completion.  You can use the Up and Down
16 arrow keys to cycle through previously typed commands.  On a given
17 command line, you can use the arrow keys to move around, in
18 conjunction with Emacs editing keystrokes.\footnote{Actually, the key
19   bindings shown below are only the defaults; they can be customized.
20   See the
22     manual}.} The most common of these are:
23 %
24 \begin{center}
25   \begin{tabular}{cl}
26     \textit{Keystroke} & \multicolumn{1}{c}{\textit{Effect}}\\
27     \verb+Ctrl-a+ & go to start of line\\
28     \verb+Ctrl-e+ & go to end of line\\
29     \verb+Ctrl-d+ & delete character to right\\
30   \end{tabular}
31 \end{center}
32 %
33 where \verb+Ctrl-a+'' means press the \verb+a+'' key while the
34 \verb+Ctrl+'' key is also depressed.  Thus if you want to change
35 something at the beginning of a command, you \emph{don't} have to
36 backspace over the whole line, erasing as you go.  Just hop to the
37 start and add or delete characters.  If you type the first letters of
38 a command name then press the Tab key, readline will attempt to
39 complete the command name for you.  If there's a unique completion it
40 will be put in place automatically.  If there's more than one
41 completion, pressing Tab a second time brings up a list.
42
43 Probably the most useful mode for heavy-duty work with \app{gretlcli}
44 is batch (non-interactive) mode, in which the program reads and
45 processes a script, and sends the output to file.  For example
46 \begin{code}
47 gretlcli -b scriptfile > outputfile
48 \end{code}
49
50 Note that \textsl{scriptfile} is treated as a program argument; only
51 the output file requires redirection (\verb|>|).  Don't forget the
52 \texttt{-b} (batch) switch, otherwise the program will wait for user
53 input after executing the script (and if output is redirected, the
54 program will appear to hang'').
55
56
57 %%% Local Variables:
58 %%% mode: latex
59 %%% TeX-master: "gretl-guide"
60 %%% End:
61