bash

Bash idioms

In a nutshell

bash idioms are tiny scripts, mostly one-liners, that accomplish a lot and can be used as building blocks in bigger scripts.

1.0 Find most frequent words

Suppose we have a bunch of text files and we wish to find the most frequently used words in those files, we can do that with the command,

cat * | tr -sc '[:graph:]' '\n' | sort | uniq -c | sort -nr

First, we capture all input with cat and pipe it to the tr command.… Read more

Bash Scripting Tutorial

1.0 Bash Script

bash can be run interactively, as a login shell or as an interactive process from a terminal emulator like the gnome-terminal. bash can be run non-interactively by running a bash script. A bash script is a list of commands written to automate some system operations work in Linux.… Read more

bash

Bash Tutorial

1.0 SHELL

A shell provides a user interface to a computer system. There are two types of shells, the command line interface (CLI) and the graphical user interface (GUI). In this tutorial, we describe the command line interface shell only and refer to it simply as shell.… Read more

Penguins

vi editor commands

vi is a classic text editor that has been available with Unix systems right from the beginning. vi has been a very popular text editor and one can edit files very efficiently using it. In this tutorial, we look at some of the vi commands that make it such a powerful editor.… Read more