Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jq: error: syntax error, Unexpected $end (Unix shell quoting issues?) at <builtin>, line 29: )

Started seeing this issue with jq suddenly out of the blue for my system where its failing for simplest of use-cases:

$ echo '{"foo": 0}' | jq .
jq: error: syntax error, unexpected $end (Unix shell quoting issues?) at <builtin>, line 29:
  )
jq: 1 compile error

Here's a description of my environment:

OS and Version: MacOS Catalina 10.15.7, 64-bit jq versions: 1.6, 1.5, 1.4

I tried installing jq with brew (brew install jq) as well as using binaries directly provided here for OSX 64-bit and getting same error. It works strangely however with jq-1.3 but thats a pretty old version missing some important filters like gsub.

like image 347
user13451415 Avatar asked Oct 23 '25 08:10

user13451415


1 Answers

Posted this issue in jq github repo and got prompted for issue with ~/.jq file. Indeed my ~/.jq file had the said syntax error. Fixing my ~/.jq file fixed the issue.

like image 96
user13451415 Avatar answered Oct 27 '25 03:10

user13451415



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!