# $EPIC: lastlog_command.txt,v 1.8 2008/04/11 23:12:17 jnelson Exp $

Synopsis:

lastlog [-] [-<flag>] [–<flag>] [-mangle <descr>] [<pattern>] [<number of entries> [<start>]]

Description:

LASTLOG allows you to grep through output lines that have previously been displayed on your screen. The contents of this buffer are controlled by SET LASTLOG_LEVEL and the size is controlled by SET LASTLOG.

For backwards compatibility reasons, up to three non-option arguments are acceptable:

  • If the first option specified is not a number, then it is treated as if it were the argument to the -LITERAL option. This MUST be the first non-option argument.
  • The first number is the number of lines to look at.
  • The second number is the position in the lastlog to start at.

Options:

Option Behavior
- Do not display the “Lastlog:” and “End of Lastlog” lines.
-literal <string> Show lines that contain this literal string.
-max <num> Show only the first <num> lines that match.
-number <nmber> Start at the <number>th recent entry
-skip <number> Skip this many leading lastlog entries
-reverse Show all lines in reverse order; from the END to the BEGINNING.
-regex <regex> Lines must match regular expression <regex>
-file <filename> Write output to <filename>.
-LASTLOG_LEVEL Where LASTLOG_LEVEL is one of the lastlog levels listed in SET LASTLOG_LEVEL; show messages of this type.
–LASTLOG_LEVEL Where LASTLOG_LEVEL is one of the lastlog levels listed in SET LASTLOG_LEVEL; do not show messages of this type.
-target <string> Show only lines with this display target.
-mangle <descr> Output is mangled by specified mangle types.
-rewrite <string> Rewrite each line before it is displayed (see below)

Examples:

To list all private messages from JoeBob:

    /lastlog -msg joebob

To list all public messages from JoeBob in the last 100 lines

    /lastlog -public joebob 100

To list all occurrences of the phrase “ircII-EPIC is cool” from 100 to 600 lines ago:

    /lastlog "ircII-EPIC is cool" 100 500

To list everything *except* messages:

    /lastlog -all --msgs

To write everything containing “foo” to “lastlog.out”:

    /lastlog -file lastlog.out foo

To list only public messages to #epic:

    /lastlog -target #epic -public

Rewriting the output:

The -REWRITE flag rewrites each line by expanding the <string> argument using the following values for $*

$0The lastlog item’s unique refnum
$1Timestamp (suitable for use with $strftime())
$2Window refnum
$3Output level
$4Reserved for future use
$5Reserved for future use
$6Reserved for future use
$7Output target
$8- The logical line of output

Remember that the <string> may be subject to quoting hell.

Example:

/lastlog -rewrite "$$strftime($1 %T) $$8-"

History:

The lastlog command first appeared in ircII. The -REWRITE flag first appeared in EPIC5-0.3.5

 
lastlog_command.txt · Last modified: 2008/04/11 18:20
 

All documentation is available under the same terms as EPIC itself.