Closed denizdogan closed 3 years ago
@denizdogan can you try double escaping?
xsv select '"MessageHeader-MessageRecipient-PartyId"' 19990101-30201124.csv
@Yomguithereal That seems to work, thanks! Is this the intended behavior?
I think so because, even if it is not ideal, this is probably the only way to make the column selection syntax (with -
, ,
, !
integer columns etc.) work well with column name escaping. This is what I found in the xsv select -h
help message on the subject:
Quote column names that conflict with selector syntax:
$ xsv select '"Date - Opening","Date - Actual Closing"'
@Yomguithereal Thanks again, closing this :)
Yes, it's intended behavior. It's documented right in the help output. -
is a meta character in column selector syntax, so you have to quote it.
It seems that selection of any headers with a dash (-) in the name fails. If it's one dash as in
A-B
, it thinks I'm looking forA
. If it's two dashes as inA-B-C
, it errors out. With no dashes, it works fine.