fex - flexible token-field extraction
Sometimes simpler than cut and awk
cut(1) from GNU coreutils (on Linux) does not support negative offsets, so you cannot ask cut to only show you the Nth field from the end. Additionally, to cut by multiple fields, you end up having to write cut ... | cut ... | cut ...
awk lets you select negative offsets using the NF variable. Get the 2nd to last field with $(NF - 1). However, cutting multiple times still requires multiple awk invocations or using awk’s split() function multiple times.
https://www.semicomplete.com/projects/fex/
fex - flexible token-field extraction - semicomplete
What is fex? Fex is a powerful field extraction tool. Fex provides a very concise language for tokenizeing strings and extracting fields. The basic usage model is that you provide a series of delimiter and field selection pairs.semicomplete
benedict16b mag das.