File: usersguide.html

package info (click to toggle)
libcli 1.9.1~20080302-1
  • links: PTS
  • area: main
  • in suites: lenny, squeeze
  • size: 184 kB
  • ctags: 190
  • sloc: ansic: 1,982; makefile: 98
file content (133 lines) | stat: -rw-r--r-- 4,289 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<HTML>
<HEAD>
<TITLE>libcli User's Guide</TITLE>
</HEAD>
<BODY>

<H1>libcli User's Guide</H1>

<H2><A NAME="TOC">Table of Contents</A></H2>
<OL>
<LI><A HREF="#Introduction">Introduction</A></LI>
<LI><A HREF="#history">History</A></LI>
<LI><A HREF="#editing">Command-Line Editing</A></LI>
<LI><A HREF="#filters">Filters</A></LI>
</OL>

<H2><A NAME="Introduction">Introduction</A></H2>

<P>
libcli provides a consistant command-line environment for remote clients,
with a few common features between every implemtation.
</P>

<P>
The library is not accessed by itself, rather the software which uses
it listens on a defined port for a Telnet connection. This connection
is handed off to libcli for processing.
</P>

<P>
The first thing that libcli does is the Telnet negotiation necessary to
establish a character mode session, rather than the Telnet default of
a line mode session. This is to enable command-line editing, completion
and history.
</P>

<P>
A libcli implementation may require authentication before giving you
access to the environment. If so, a <EM>Username:</EM> prompt will be
issued. Enter the username you have been given, and a <EM>Password:</EM>
prompt will appear. The characters you enter for your password will not
be echoed.
</P>

<P>
To leave any libcli command-line environment, enter the command
"<EM>quit</EM>" (aliases are <EM>exit</EM> and <EM>logout</EM>), hit
Ctrl-D, or simply break the connection.
</P>

<H2><A NAME="history">History</A></H2>

<P>
libcli keeps track of the last 256 commands you entered in the session.  To
navigate through the history, use the up and down arrow keys (or ^P/^N).
</P>

<P>
You can also enter "<EM>history</EM>" to get a list of all the commands
in the history.
</P>

<H2><A NAME="editing">Command-Line Editing</A></H2>

<P>
You can edit the command currently at the prompt:
<LI>Left and right arrows move the cursor around on the line, as do ^B/^F.</LI>
<LI>^A moves the cursor to the start of line, ^E to the end.</LI>
<LI>^H and DEL delete the character to the left of the cursor.</LI>
<LI>^W deletes the word to the left of the cursor.</LI>
<LI>^U clears the current line.</LI>

<P>
After changing the line and hitting enter, the new command line will be
added to the end of the history.
</P>

<P>
If you don't remember the command name that you want, you can press
? at any time to get a list of available commands. If you enter ? when
you are half-way through entering a word, you will get a list of all
commands which match what you have already entered.
</P>

<H2><A NAME="filters">Filters</A></H2>

<P>
You can limit the output of any command to a subset of the total
output by using any of the following filters.
</P>

<P>
You specify the filters you want to use by appending <B>|</B> (pipe)
to your command line, followed by the filter name, and any parameters
that the filter requires.  Parameters may be quoted with '' or "".  If
more parameters are provided than are expected by the filter,
additional arguments are appended to the last, seperated by a single
space (i.e. "<TT>| inc foo&nbsp;&nbsp;&nbsp;bar</TT>" is equivalent to
"<TT>| inc 'foo bar'</TT>").
</P>

<H3>Available Filters</H3>

<DL>
    <DT><B>i</B>[<B>nclude</B>] <I>string</I>
    <DT><B>ex</B>[<B>clude</B>] <I>string</I>
	<DD>Include or exclude lines which contain the literal string
	given by <I>string</I>.

    <DT><B>beg</B>[<B>in</B>] <I>string</I>
	<DD>Include all lines from the first which matches the given
	<I>string</I>.

    <DT><B>bet</B>[<B>ween</B>] <I>string1</I> <I>string2</I>
	<DD>Include lines which include <I>string1</I> through to the
	next line which matches <I>string2</I>.

    <DT><B>c</B>[<B>ount</B>]
    	<DD>A count of non-blank lines is output.

    <DT><B>g</B>[<B>rep</B>] [<B>-vie</B>] <I>pattern</I>
    <DT><B>eg</B>[<B>rep</B>] [<B>-vie</B>] <I>pattern</I>
	<DD>Include lines which match the regular expression (or
	extended regular expression) given by <I>pattern</I>.<BR>
	The <B>-i</B> option makes the match case insensitive, <B>-v</B>
	inverts the sense of the test (include lines which do not
	match) and <B>-e</B> may be used on the off chance you wish to
	search for a string matcing <B>^-[vie]+$</B>
</DL>

<SMALL>David Parrish &lt;david@dparrish.com&gt; 2004-02-25</SMALL>
</BODY>
</HTML>