3 ms·
Hm. Why not re-use "tee"? https://www.man7.org/linux/man-pages/man1/tee.1.html https://www.man7.org/linux/man-pages/man1/tee.1.html
by e12e 4y ago
Hm. Why not re-use "tee"?
https://www.man7.org/linux/man-pages/man1/tee.1.html https://www.man7.org/linux/man-pages/man1/tee.1.html
- pxc 4y ago`save` seems to be a general serialization command, which lets you save Nu objects in formats like JSON, YAML, and others. The `--raw` option seems like a convenience for enabling that tee-like usage without relying on external programs, but the driving use case is serializing structured data rather than unstructured text or byte streams.
- e12e 4y agoAh, I failed to realize that nushell deals with rich data. I think this might hit the sweetspot for me, for dealing with json - I never could get a feel for "jq" like I have with sed/awk, and don't much enjoy powershell. I don't think I need a new shell (bash is fine - and I would probably move to fish for a new shell if I were to change) - but I certainly need a sane way to wrangle json (hello docker inspect!) and yaml (hello kubectl/k8s and github actions!).
- pxc 4y agoFWIW, I've made basically the same call for now: Fish has been my daily driver for some time, but I have a lot of interest in Nushell and some real affection for Elvish, and I think I'd like to eventually make the switch to one of these newfangled shells with the structured pipelines one day. The great thing about shell languages is that you get to practice the scripting language with your everyday interactive usage, which is one of the main reasons I'd eventually like to switch, even if I see that perhaps the most exciting use cases are wrangling JSON and YAML in scripts.