28 May 2025 Report - Day 3 - Basics of bash scripting

Content

I completed the chapter 1 today and started with chapter 2. What I learned today is:

  1. Background Jobs and Priorities

The commands running in background is called background job where no user input is required. This is done by putting ‘&’ after the command. Every job is assigned a priority in system.

  1. Background I/O

Background jobs will not have terminal control and thus no input and output is required there.

  1. Special Characters, Quoting, Quating quotation marks and Backslash-escaping

Special character including wildcards have specific meaning to shell. Using special characters without meaning is quoting. To change meaning of character backslash can be used. It acts as using quotes.

  1. How to continue lines in terminal

We can quote the RETURN key by ending line with backslash or not closing the quotation mark and remove the original meaning of RETURN key.

  1. Control keys and help command

Control keys are type of special character which do not print anything on screen but considered as special commands by system.
The help command in gives information about the commands when you type help with the command.

  1. Started with Chapter-2: Command-Line Editing

bash starts as emacs-mode. Editing mode in shell can be done by using set commands.

  1. The History List

The commands typed are recorded in shell history.

Some of the commands I learnt are:

  1. find command: Matches the string provided for the files in the current directory
find
  1. To see settings and change them.
stty
  1. Some of the control keys are:
CTRL-M
CTRL-D
CTRL-S
CTRL-Q
CTRL-H
CTRL-U
CTRL-?
  1. help command: This command gives information about the command. Using ‘more’ will show one screenful at a time.
help
  1. To enter editing mode in shell using set command.
set -o emacs
set -o vi
  1. The bash command history when shell is exitted is saved in this file.
.bash_history
  1. To call bash history file.
echo $HISTFILE