this post was submitted on 11 Jul 2025
26 points (86.1% liked)

Linux

56329 readers
1056 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 6 years ago
MODERATORS
top 12 comments
sorted by: hot top controversial new old
[–] ArseAssassin@sopuli.xyz 6 points 22 hours ago (1 children)

I don't know if we should call someone a master of jq if they do

echo '{"k1": [{"k2": [9]}]}' | jq '.k1 | .[0] | .k2 | .[0]'

Instead of just

echo '{"k1": [{"k2": [9]}]}' | jq '.k1[0].k2[0]'

[–] MonkderVierte@lemmy.zip 1 points 27 minutes ago* (last edited 16 minutes ago)

Both are bad. Make it readable.

And if you often resort to jq, better use python or at least something like nushell.

[–] h4x0r@lemmy.dbzer0.com 16 points 1 day ago (1 children)
[–] MRIG@slrpnk.net 5 points 1 day ago

If you're going to use jq to manipulate JSON I'd recommend a helper CLI tool like ijq. It allows you to experiment without needing too lines in your terminal history.

[–] gramgan@lemmy.ml 3 points 1 day ago (1 children)

I’m curious if anyone else has considered using nushell for these things? Probably not for everything (or to replace one’s shell) but it definitely is simpler for basic tasks.

[–] slackness@lemmy.ml 1 points 1 day ago

That's the primary value offer of nushell so at least people who made it considered it I'd say.