Skip to content

Linux

All articles related to the Linux OS, Linux Command Line, Kernel, and Distros.

Logical Operators Cover

Bash logical operators

Logical operators (AND, OR and NOT) serve multiple purposes in bash. First and foremost, they are used to create complex expressions by combining simpler ones. Depending on the version of test and bash in use the syntax of logical operators might change. Logical operators are… Read More »Bash logical operators

Bash Matching Regex Cover

Matching regex in bash

In the last article we talked about the test command. The test command evaluates conditional statements on files, strings, and integers. In order to match against a regular expression, we need to use a new type of compound command. This command serves as a wrapper… Read More »Matching regex in bash

Linux Shell Script Test Cover

Using test in Linux scripts

In the last article we talked about the basics of Linux shell scripts. In this one, we’ll mention test, a command-line utility that evaluates and compares conditional expressions. Test is a shell builtin most commonly used with the if statement. Depending on the expression, conditional… Read More »Using test in Linux scripts