Tagged "Nushell"

Nushell vs Bash

After last week’s post on how Nushell can be used to convert unstructured data to structured data, I wondered how I would approach the task using traditional tooling. I wrote ‘Bash’ in the title, but what I precicesley mean is POSIX pipes and command line utilities typically found on a Unix-like environment (Linux, macOS, etc).

Again, the task is to convert weirdly structured text output (from sshping) to JSON for further processing or long term storage. For example, I might set up a cronjob to run analytics for my SSH connectivity. The results would be handy to have in JSON for later statistics.

Converting Command Line Output to JSON with Nushell

Nushell

Nushell is pretty great.

It’s a new shell that has as its biggest selling point the fact that pipes are inherently structured.

I’ve been playing around with version 0.13.0 and was able to find a few rough edges. But I really will be using this in the future.

Often, I am torn between writing scripts in Bash or Python. Python is obviously much saner for bigger tasks. But Bash operates nicely with the POSIX world and pipes are just great. Nushell looks like a great replacement of Bash (or equivalent) where data is not just raw lines of text.