Tail
(since EVL 1.1)
Command prints to output last <num>
records of input. Without option ‘-n’ prints last
10 records.
- Tail
-
is to be used in EVS job structure definition file.
<f_in>
and<f_out>
are either input and output file or flow name. - evl tail
-
is intended for standalone usage, i.e. to be invoked from command line.
EVD is EVL data definition file, for details see evl-evd(5).
Synopsis
Tail <f_in> <f_out> [<evd>|-d <inline_evd>] [-n [+]<num>] [-s|--skip-parse] [--validate] [--skip-bom] [ -x|--text-input | --text-input-dos-eol | --text-input-mac-eol ] [ -y|--text-output | --text-output-dos-eol | --text-output-mac-eol ] evl tail [<evd>|-d <inline_evd>] [-n [+]<num>] [-s|--skip-parse] [--validate] [--skip-bom] [ -x|--text-input | --text-input-dos-eol | --text-input-mac-eol ] [ -y|--text-output | --text-output-dos-eol | --text-output-mac-eol ] [-v|--verbose] evl tail ( --help | --usage | --version )
Options
- -d, --data-definition=<inline_evd>
-
either this option or the file <evd> must be presented. Example: -d ’id int, user_id string(6) enc=iso-8859-1’
- -n, --records=[+]<num>
-
output the last <num> records instead of the default last 10; or use -n +<num> to output starting with record <num>
- -s, --skip-parse
-
with this option it does not parse all fields, but ’jump’ over record separator, i.e. the separator of the last field. Be careful with this option, it is particularly good for ’csv’ files, when you want to skip some weird formatted header for example, but might be a wrong solution when some fields are separated by the same character as the last one.
- --skip-bom
-
skip utf-8 BOM (Byte order mark) from the beginning of input, i.e. EF BB BF. Windows usually add it to files in UTF8 encoding
- --validate
-
without this option, no fields are checked against data types. With this option, all output fields are checked
- -x, --text-input
-
suppose the input as text, not binary
- --text-input-dos-eol
-
suppose the input as text with CRLF as end of line
- --text-input-mac-eol
-
suppose the input as text with CR as end of line
- -y, --text-output
-
write the output as text, not binary
- --text-output-dos-eol
-
produce the output as text with CRLF as end of line
- --text-output-mac-eol
-
produce the output as text with CR as end of line
Standard options:
- --help
-
print this help and exit
- --usage
-
print short usage information and exit
- -v, --verbose
-
print to stderr info/debug messages of the component
- --version
-
print version and exit
Examples
- Print to stdout only last 10 records:
evl tail example.evd -xy <in.txt
- Read the binary input and skip first 2 records without parsing them (i.e. they no need to have the
data structure defined by evd):
cat input.bin | evl tail -sy -n+3 \ -d'id int sep=",", updated date sep="\n"' > output.txt