Shell
All posts under tag "Shell"

Bash: An Example of Optimizing Filtering Commands with grep and awk
I will tell you about a task I solved the other day🧑💻 I slightly changed the input data, but the essence remains the same. There are two CSV files: 📄ping_status.csv contains diagnostic information about host availability by ping.

Bash: Features of Arithmetic Operations - Increment ((expression++))
When testing the host availability check script I mentioned last time, I encountered an interesting Bash feature when performing arithmetic operations💪.

Bash: Writing a Universal Host Availability Check Script
Today we'll write a useful Bash script🧑💻 that performs various host availability checks on the network🌐. As an example, I'll show how to check connectivity using the `ping` utility🏓 and run a traceroute when it's lost⚡.

flock - Locks in Shell Scripts
In this note, we will talk about file locks in Bash scripts🔒 using the specialized utility flock.

Configuring logging of Bash script output
Many users of Linux🐧 systems face the need to write the output of a particular command/script to a log file📑. In this article we will look at several ways to configure journaling (aka logging) in Linux using the popular command shell — Bash, as an example.

Writing a Function for Quick Access to Complex Commands in Zsh and Bash
In this article we will create a function for the Zsh and Bash shells that allows quick and convenient access to a prepared list of complex, long, and hard-to-remember commands🤯.

bat, exa — Syntax Highlighting for Standard Output in the Linux Terminal (cat, less, tail and ls)
They say that if you read white text on a black background for too long, you start to hear the terminal whisper🙃. In this note we'll talk about how to improve the perception of text from the "black window" by adding syntax highlighting with the command-line utilities bat and exa.

Linux command line, privilege escalation: su, sudo commands
We continue studying the Linux command line. Today we'll learn how to properly run commands on behalf of another user, including the root user.


