Tail
The file.tail function returns the last line of the file. Only up to the last 256 characters of the file are returned, including any trailing newline. This may be the end of the last line if it is more than 256 characters long. If the file does not exist 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 16.
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)
File access restriction
Files accessed in this function are restricted by the limit files section in the main security configuration. If present in radiusd.conf, only files in the paths listed can be accessed.