EVL

Table of Contents


Products, services and company names referenced in this document may be either trademarks or registered trademarks of their respective owners.

Copyright © 2017–2020 EVL Tool, s.r.o.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts.

Tail

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

syntax/Tail
Tail
  <f_in> <f_out> [<evd>|-d <inline_evd>] [-n [+]<num>] [-s|--skip-parse]
  [--validate]
  [ -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]
  [ -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.

--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

-a, --text-input-dos-eol

suppose the input as text with CRLF as end of line

-b, --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

  1. Print to stdout only last 10 records:
    evl tail example.evd -xy <in.txt
    
  2. 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