jordansissel / fex

fex - flexible field/token extraction
Other
57 stars 9 forks source link

fex cutting off non–newline-terminated lines #11

Open catsbian opened 4 years ago

catsbian commented 4 years ago

Seems like fex always chomps off the last byte, expecting it to be a newline, regardless of whether it’s actually a newline? For example:

% echo a bc | fex -1
a bc

but

% echo -n a bc | fex -1
b
jordansissel commented 4 years ago

Oh good find. I believe this is a bug!

On Thu, Jul 9, 2020 at 8:43 PM catsbian notifications@github.com wrote:

Seems like fex always chomps off the last byte, expecting it to be a newline, regardless of whether it’s actually a newline? For example:

% echo a bc | fex -1

a bc

but

% echo -n a bc | fex -1

b

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jordansissel/fex/issues/11, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABAF2UVUNEAHGYOCRSKFMDR22E4ZANCNFSM4OWGKOFA .