How to create dialog boxes in an interactive shell script

When you install new software in the terminal environment, you may often see informative dialog boxes popping up, accepting your input. The type of dialog boxes ranges from simple yes/no dialog to input box, password box, checklist, menu, and so on. The advantage of using such user-friendly dialog boxes is obvious as they can guide […]
Continue reading…

 

How to create a nifty terminal theme inside a Linux terminal

Many of you Linux junkies will probably spend most of your time in terminals. So you may be wondering how to spice up the plain old boring-looking terminal environment. If you are looking to enhance the look of your terminal window, one way is screenFetch. According to its creator, screenFetch is a “bash screenshot information […]
Continue reading…

 

How to measure packets per second or throughput on high speed network interface

There are many traffic monitoring tools available on Linux, which can monitor/classify network traffic, and report real-time traffic statistics in fancy user interfaces. Most of these tools (e.g., ntopng, iftop) are powered by libpcap, which is a packet capture library used to monitor network traffic in user space. Despite their versatility, however, libpcap-based network monitoring […]
Continue reading…

 

How to check if a file exists on a remote server

There are circumstances where you want to test if a file exists somewhere on a remote Linux server (e.g., /var/run/test_daemon.pid), without logging in to the server interactively. For example, you may want your script to behave differently depending on whether or not a specific file exists on a remote server. In this tutorial, I will […]
Continue reading…

 

How to parse JSON string via command line on Linux

If you often deal with JSON-formatted texts from the command line or in shell scripts, you may wonder if there is any command-line utility which can parse JSON string. A command-line JSON parser can be handy when you test or debug JSON web services. You can feed JSON-formatted responses from web services into the command-line […]
Continue reading…