7. Working with strings

7.1 Case insensitive matching

The i or I as a flag for the substitution command implies case-insensitive substitution. Here, the pattern is lowercase and the s command will substitute to upper case ignoring case.

sed  -n 's/victor hugo/VICTOR HUGO/pi' books.log

Th...

1. Stream Editor : sed

sed (Stream Editor) is a robust command-line tool utilized in Linux and Unix-like operating systems for the purpose of parsing and modifying text.

It operates as a non-interactive text editor, which indicates that it automatically processes text according to a predefined s...

People's Choice was an American funk band formed in 1971 in Philadelphia by Frank Brunson and David Thompson. While they had several vocalists, their biggest hits were instrumentals.

awk

1. Awk, gawk, mawk, nawk

Awk is a kind of programming language designed for advanced text processing. Awk needs an input, performs some actions and delivers the result to standard output.

The GNU implementation of awk is called gawk, but for the end-user calling awk interpreter is transparent an...

To extend the sudo password timeout session on a Linux system, we need to modify the sudoers file. Example of a sudoers file that we have to modify :

sudoers

    sudo visudo

Find the line that begins with Defaults env_reset and add the timestamp_timeout option :

    Defaults env_reset,timestamp_time...