Skip to content
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

ngOnChanges Cover

Using ngOnChanges

ngOnChanges is a lifecycle hook that is being invoked every time a variable decorated by @Input changes. We are intercepting and handling changes inside a ngOnChanges(changes: SimpleChanges) method. We are using the SimpleChanges API, an interface that represents all the changes stored by a particular… Read More »Using ngOnChanges