1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
#
# use -show_parsed option to only report what has been parsed
#
# Remember that the parsed table must have the same number of fields in every line
# The table below will give an error when parsing with -field_delim_collapse and
# -strip_leading_space because the header line has only 3 fields (it will be
# interpreted as "A B C"). You can fix this by either setting field_delim_collapse=no and
# strip_leading_space=no or by replacing the space with a missing data
# string in the first field of the first line, like this (this is highly suggested)
#
# - A B C
# A 0 1 2
# B 3 4 5
# C 6 7 8
#
# this works
# cat parse-example-1.txt | ../bin/parse-table -field_delim \s -field_delim_collapse -no-strip_leading_space
#
# this gives an error
# cat parse-example-1.txt | ../bin/parse-table -field_delim \s -field_delim_collapse -strip_leading_space
#
A B C
A 0 1 2
B 3 4 5
C 6 7 8
|