-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow setting raw input delimiter #965
Comments
I agree. |
I have a concern. If we enable setting the delimiter, do we automatically On Mon, Sep 28, 2015 at 2:27 PM Nico Williams [email protected]
|
Yes, probably, like slurp
But how would that work? Without stopping streaming? |
@wtlangford Strings can contain newlines. Newlines in strings have to be escaped in encoded JSON texts, but here we're not dealing with JSON texts, as the input is raw, and the output of the "parser" is a |
Fair enough. I'm convinced. On Mon, Sep 28, 2015, 15:27 Nico Williams [email protected] wrote:
|
Having the same problem processing zsh history files, which use newlines between records, but may contain escaped newlines within records. I got |
We should add a |
The BTW, as pointed out in #1271, JSON strings can contain both LF ( |
Comes from wader/fq#1019 I also expect jq can be an alternative for perl/sed/awk. fq have imported |
As far as I can tell, this is not currently possible?
main use case:
find | jq -R
worksbut because filenames can contain newlines that is not safe, so I'd like to use
find -print0
, but jq does not allow setting \0 as the input delimiter (or setting it at all).It can be circumvented with
but that disables streaming the input
Usage in other programs (for \0):
xargs -0
orxargs --null
sed -z
orsed --null-data
The text was updated successfully, but these errors were encountered: