"-Bt" prints an extra line at the top
wjandrea opened this issue · 5 comments
wjandrea commented
E.g.
$ printf 'foo\nbar' | pawk -Bt
foo
bar
I was just trying out pawk when I noticed this.
alecthomas commented
"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...
wjandrea commented
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.
sebhaase commented
Please close this issue.
wjandrea commented
@sebhaase The documentation is still wrong, though I'm not concerned, so I'll leave it to Alec whether they want to close this.
alecthomas commented
Documented!