alecthomas/pawk

"-Bt" prints an extra line at the top

wjandrea opened this issue · 5 comments

E.g.

$ printf 'foo\nbar' | pawk -Bt

foo
bar

I was just trying out pawk when I noticed this.

"t" is the input text up until that point, so at the beginning (-B) it will be empty. If you use -E it will work as expected.

That's probably just a documentation issue...

Ah, I see, so pawk -Bt is equivalent to pawk -B '""' '' or awk 'BEGIN {print} //'.

Yes, the documentation says the expression is required:

Usage: cat input | pawk [<options>] <expr>

So I guess I would expect it to error in that case, but anyway, nbd for me personally.

Please close this issue.

@sebhaase The documentation is still wrong, though I'm not concerned, so I'll leave it to Alec whether they want to close this.

Documented!