29 May 2025 Report - Day 4 - Basics of bash scripting

Content

The chapter 2 contains majorly about emacs and vi text editors and their commands. There are new text editors currently like VSCode and thus I have not focused much deeply in these. I also started reading the chapter 3 today. The other topics covered are:

  1. The fc command
    This is used to see the previous history commands.

  2. The History Expansion and Word Desingnator, Modifiers This helps to recall and edit commands in the history list. Word designator helps to refer to specific words in previous command. Modifiers follow the word designator if present any.

  3. readline The command-line editing interface of bash is readline. It provides editing in either emacs or vi modes. The default startup file is .inputrc.

  4. Key Bindings Using bind we can see the current settings of bash command line. usomizing your envioronment.

  1. Start Chapter 3: Customizing your environment.
    Envirnment is collection of concepts

  2. Aliases and Options The command name can be changed by aliases command in bash.Aliases can be used at beginning of command string majorly.
    Options let you change the behavior of shell as they are on or off.

The commands learned today are:

  1. fc -l command: This command lists the previous commands in the bash history.
fc -l
  1. fc -s command: This command helps to rerun the command.
fc -s
  1. !! command: This command will reexcute the last command.
!!
  1. bind command: This command will show the current settings of bash terminal
bind
  1. Spcial files when log in and out of shell.
.bash_profile
.bash_logout
.bashrc
  1. UNIX searching utility:
grep
  1. set -o optionname command: This command help to change the command with more than one option with set command.
set -o command