FreeRADIUS InkBridge

Tail

The tail function returns the last line of the file. If the file does not exist, or if the line is more than 256 characters in length, it fails and nothing is returned.

The function takes an optional second argument, which is the number of lines which should be returned. The maximum number of lines which will be returned is limited to 15.

Syntax

%file.tail(string, [ uint32 ])

Example 1. Returning the last line of a file
string line

line := %file.tail("/var/log/radius.log")
Example 2. Returning the last n lines of a file
string line

line := %file.tail("/var/log/radius.log", 2)