A data-oriented shell

Working with Pipeline Data

Once you have data in a Nushell pipeline (whether from an internal command, open, or even an external command's output that you parse), you use a rich set of commands to manipulate it:

http get https://api.example.com/users | from json | where join_date > 2022-01-01 | get name

Overall, working with structured data in Nushell means you can treat your shell like a lightweight data processing engine. This is a huge productivity boost when dealing with JSON APIs, logfiles, CSV exports, and other types of data, during administration or development tasks.

Using Nushell for Sys Admin Tasks

Nushell's capabilities aren't limited to parsing data; they extend naturally to many system administration use cases. Because you can seamlessly integrate system commands with Nushell's structured pipeline, tasks that involve gathering system info, monitoring resources, or automating system changes become simpler and more robust.

Monitoring Processes and Resources

As shown earlier, ps gives a live view of processes. A sys admin can easily build one-liners to find problematic processes. For example,

ps | where mem > 10mb | sort-by mem

filters the process list to anything using over 10MB of memory and sorts the result by memory usage (Figure 6).

Figure 6: Using ps to find processes consuming more than 10MB of memory.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • FOSSPicks

    After building a 3D printer last month, Graham's home is now filled with cup holders, phone holders, cable holders, and tiny PLA boats. This month, Graham explores Zrythm, Mumble 1.3, NoteKit, Kirogi, monolith, pastel, Nu Shell, PacVim, Stunt Car Racer Remake, and more!

  • Spider, Spider

    Scrapy is an open source framework written in Python that lets you build your own crawlers with minimal effort for professional results.

  • Advanced Shell Scripting

    Shell scripting is a versatile tool for managing and automating the modern IT infrastructure. This article reaches beyond the basics with some advanced techniques for tackling real-world challenges.

  • Bash vs. Vista PowerShell

    Microsoft’s new PowerShell relies on .NET framework libraries and thus has access to a treasure trove of functions and objects. How does PowerShell measure up to traditional shells like Bash?

  • Tutorial – Shell Scripting

    You do not need to learn low-level programming languages to become a real Linux power user. Shell scripting is all you need.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News