top | item 41560170

(no title)

krelas | 1 year ago

Here’s one for HN readers, you can now find jq in /usr/bin/ in Sequoia.

discuss

order

switch007|1 year ago

$ jq '.[] | messages | .thank_you' < strings.json

wait, maybe it's...

$ jq '. | .messages.thank_you' < strings.json

darn it! how about

$ jq '[].messages.thank_you' < strings.json

!??@@!

LeoPanthera|1 year ago

Figuring out what garbage to type into jq is the best thing about ChatGPT.

gcr|1 year ago

jq's syntax is different, but well worth remembering.

i have some flash cards if you'd like. a teensy amount of effort pays huge dividends with swiss knife software like this (and things like matplotlib, tar CLI options, etc)

throwitaway1123|1 year ago

Wow, that might be the best part of the update. System Integrity Protection shields /usr, /bin, and /sbin, so I prefer to use the system provided executables in those directories when possible.

subjectsigma|1 year ago

Whoa, you're right. How did you know? The developer notes only seem to talk about API changes

krelas|1 year ago

I manage a lot of Macs, been beta testing since June.

vbezhenar|1 year ago

Now that's the real feature!

andrelaszlo|1 year ago

Is it the BSD jq from 1995? </s>

Jk, thanks for the info! It's nice to know it's available on the system by default when writing scripts for my team.

wpm|1 year ago

Nah just the last GPL2 licensed version from 2008

ope wait that's just bash