SlideShare a Scribd company logo
https://github.com/syaifulahdan/os­practice|Operating System Practice |1 to 52 
OPERATING SYSTEMS PRACTICE
Working With Bash Shell
Practice : 5A

History on Bash Shell

Creating a Bash Shell Script
https://github.com/syaifulahdan/os­practice|
https://github.com/syaifulahdan/os­practice|Operating System Practice |2 to 52 
A. Objectives
1. Understanding the shell on Linux operating system.
2. Using feature history in Bash Shell.
3. Change the history feature in Bash Shell.
4. the shell prompt.
5. Configure Bash Shell to run scripts automatically.
6. Create and execute simple shell scripts via vi editor.
7. Understand the job control.
8. Understand the stack.
9. Using aliases
https://github.com/syaifulahdan/os­practice|Operating System Practice |3 to 52 
B. Basic Theory
https://github.com/syaifulahdan/os­practice|Operating System Practice |4 to 52 
1. SHELL
Shell is a Command executive, meaning the program awaits
the user's instructions, checks the syntax of the given
instruction, then executes the command.
Shell is marked with a prompt. For user use prompt $ and
for superuser use promp #.
shell type:

/bin/sh
Developed by UNIX Berkeley known as C-Shell

/bin/csh
Bourne shell, designed by Steve Bourne of AT & T

/bin/bash
Compatible with Bourne Shell and also adapting Korn-Shell's ability.
The fundamental difference between Shell is resolved almost non-
existent, except in programming and editing facilities.
https://github.com/syaifulahdan/os­practice|Operating System Practice |5 to 52 
1. SHELL
Shell is a Command executive, meaning the program awaits
the user's instructions, checks the syntax of the given
instruction, then executes the command.
Shell is marked with a prompt. For user use prompt $ and
for superuser use promp #.
shell type:

/bin/sh
Developed by UNIX Berkeley known as C-Shell

/bin/csh
Bourne shell, designed by Steve Bourne of AT & T

/bin/bash
Compatible with Bourne Shell and also adapting Korn-Shell's ability.
The fundamental difference between Shell is resolved almost non-
existent, except in programming and editing facilities.
https://github.com/syaifulahdan/os­practice|Operating System Practice |6 to 52 
2. PROFILE
At login time, the program will run some program that is:
1. /etc/profile
It contains a shell script that applies to all Linux users.
2. Profile for each user
In the home directory, the login will first check the .bash_profile file.
If no, then the .bash_login file will be searched. If .bash_login does not
exist, then look for file named .profile
3. .bashrc
This file will be executed for switching from one shell to another through
su.
4. .bash_logout
At logout, bash will search for file .bash_logout. When present, the file
will be executed before logout
https://github.com/syaifulahdan/os­practice|Operating System Practice |7 to 52 
The contents of / etc / profile:
# System wide environment and startup programs
# Functions and aliases go in /etc/bashrc
PATH=”$PATH:/usr/X11R6/bin”
PS1=”[u@h W]$ “
umask 022
USER=’id –un’
LOGNAME=$USER
MAIL=”/var/spool/mail/$USER”
HOSTNAME=’/bi n/hostname’
HISTSIZE=1000
HISTFILESIZE=1000
Export  PATH  PS1  HOSTNAME  HISTSIZE  HISTFILESIZE  USER 
LOGNAME MAIL
https://github.com/syaifulahdan/os­practice|Operating System Practice |8 to 52 
PATH merupakan daftar nama direktori. Bila sebuah instruksi
diberikan dari prompt shell, maka instruksi tersebut akan
dicari pada daftar tersebut.
PS1 adalah prompt dimana
u = Nama User
h = Nama Host
W = Nama working direktory
https://github.com/syaifulahdan/os­practice|Operating System Practice |9 to 52 
3. HISTORY
History is adapted from C-Shell, which is a record of all
the instructions that have so far been done. These
records can be viewed as history, then can be re-
selected, edited and executed. History allows the user to
re-edit complex and lengthy instructions, especially
when errors occur in the writing of instructions and
parameters.
^P (Ctrl-P) see previous instructions
^N (Ctrl-N see the next instruction
!! execution of previous instructions
!! –3 3 previous instructions will be repeated
!!88 repeat instruction no 88
https://github.com/syaifulahdan/os­practice|Operating System Practice |10 to 52 
4. BASH-SCRIPT
Bash-script is a file that contains a collection of executable
programs. For bash script execution use .
before the bash-script file which means shell and sign
execution ./ means the bash-script file is in the actual
directory.
https://github.com/syaifulahdan/os­practice|Operating System Practice |11 to 52 
5. JOB CONTROL
Job is a program execution given to the kernel. A Job is
deemed complete, when the execution of the program ends.
Execution Job is the same as the execution of the program,
both Background process and Foreground process.
https://github.com/syaifulahdan/os­practice|Operating System Practice |12 to 52 
5. EDITOR vi
Vi is a full screen editor, meaning the editor can take
advantage of the full-screen facility. Vi has 2 pieces mode,
namely:

Command line
The vi editor interprets the input as an instruction to be
executed by the editor, examples such as searching text,
changing text automatically and others.

Editing
The vi editor interprets the output as text to be inserted into
the buffer editor. At the bottom of the screen will display the
text "INSERTING".
https://github.com/syaifulahdan/os­practice|Operating System Practice |13 to 52 
At the beginning of vi run, the program enters command mode. With
pressing the "i" button will then enter editing. To return to
command mode, press the Esc key.
The keys of the vi editor text can be seen in the table as follows:
H Move cursor to left one character
J Move the cursor to the right of one character
K Pinda h kursor ke atas
L Move the cursor down
O Insert text (one line after cursor position) To exit the 5 insert lock
models next to this and
activate other keys, then we
must press the Esc key first
I Insert text (to the left of the cursor position)
A Insert text (to the right of the cursor position)
I (Shift i) Insert text (in the starting position of the line)
A (Shift a) Insert text (at the end of the line)
https://github.com/syaifulahdan/os­practice|Operating System Practice |14 to 52 
X Deleting 1 letter (to the right of the cursor position)
Dw Delete 1 word (to the right of the cursor position)
Dd Removing 1 row (to the right of cursor position)
Yy Copying 1 line
2yy Copying 2 lines
P (Paste) Displays a sentence line that has been copied with yy key.
Cw Replace 1 word that has been written to the right of the cursor position with another word
Cc Replace 1 sentence line that has been written to the right of the cursor position with
another sentence
ctrl- b Reverse one screen
ctrl- f Forward one screen
ctrl- d Forward half screen
B Move the cursor to the left of one word
W Move the cursor to the right of one word
^ Go to the beginning of the line
$ Go to the end of the line
U Cancel the last command
U Undoes all text changes on the line where the cursor is located
:! Quit temporarily from vi editor and execute another command
https://github.com/syaifulahdan/os­practice|Operating System Practice |15 to 52 
:wq Write and quite, save the file and exit
:q! Exit vi without saving
:se all Displays all set status options
:se nu Displays the line number on the left of the screen
/string Looking for strings forward
?string Looking for strings toward the back
N Forward the search for the same direction
N Continue searching for different directions
https://github.com/syaifulahdan/os­practice|Operating System Practice |16 to 52 
C. Step by Step
https://github.com/syaifulahdan/os­practice|Operating System Practice |17 to 52 
1 Login as user.
2 Open the Console Terminal and do the experiments
below and then analyze the results of the
experiment.
3 Conduct the experiments below and then analyze
the experimental results.
4 Complete the practice questions.
https://github.com/syaifulahdan/os­practice|Operating System Practice |18 to 52 
D. Experiment
https://github.com/syaifulahdan/os­practice|Operating System Practice |19 to 52 
Experiment 1 : Profile
1. The .bash_profile file runs on the user's home directory
login. The .bash_profile file is a hidden file, so to see it use
option a on the ls instruction.
$ ls –a
$ more .bash_profile
2. The .bash_logout file will be executed shortly before
logout, functioning as a house clearing job, which means to
clear everything, for example deleting temporary file or
other job. View the .bash_logout file with instructions
$ cat .bash_logout
https://github.com/syaifulahdan/os­practice|Operating System Practice |20 to 52 
Experiment 2 : Using Feature History Bash
1. Bash shell keeps the "history" command used before.
You can do history in some way. The easiest way is to use
the Up Arrow, then the previous command will be
displayed.
2. Next, give the Bash shell some commands to remember.
Enter the following command and press Enter on each line.
$ cd
$ ls –l /etc
$ ls –l
$ whoami
$ who
https://github.com/syaifulahdan/os­practice|Operating System Practice |21 to 52 
3. To check if this command is added to the history, it can
use the history command to see all the commands ever
inserted..
$ history
4. You can select the previous command by using Up
Arrow, but this is not efficient for increasing orders.
A simple way of using numbers in history commands or
searching for them. To select and execute commands by
number, enter the key! followed by the command number..
$ !<Nomor Perintah>      Contoh : !780
https://github.com/syaifulahdan/os­practice|Operating System Practice |22 to 52 
3. To check if this command is added to the history, it can
use the history command to see all the commands ever
inserted..
$ history
4. You can select the previous command by using Up
Arrow, but this is not efficient for increasing orders.
A simple way of using numbers in history commands or
searching for them. To select and execute commands by
number, enter the key! followed by the command number..
$ !<Nomor Perintah>      Contoh : !780
https://github.com/syaifulahdan/os­practice|Operating System Practice |23 to 52 
5. You can search for commands by including the desired
commands. For example !? Etc ?! will execute the
previously used ls ­l /etc command.
$ !?etc?
6. Then use the history command, it will show the ls 
­l /etc command instead of !? Etc?.
$ history
7. If the string is not found in the history command there
will be an error message.
$ !?wombat99?
https://github.com/syaifulahdan/os­practice|Operating System Practice |24 to 52 
8. If typed !Who then it is executed is the who command.
But if you type !Whoa then the whoami command is
executed.
$ !who
$ !whoa
9. You can replace string in history command, especially on long
command.
- For example type cat /bin /bash | strings | grep shell | less and
press Enter. It will show all the strings in the /bin  /bash file
containing the word "shell". To exit press q.
- If you want to display the word "alias", then you do not have to
type long command again, but just type ^shell^alias^ and press
Enter it will replace the word "shell" with "alias".
$ cat /bin/bash | strings | grep shell | less
$ ^shell^alias^
https://github.com/syaifulahdan/os­practice|Operating System Practice |25 to 52 
Experiment 3 : Change Feature
History Bash
1. Bash shell will keep the history command even
after logging out and logging in again.
The .bash_history file stores the history file
contained in the home directory.
$ cd
https://github.com/syaifulahdan/os­practice|Operating System Practice |26 to 52 
2. View a few lines in the .bash_history file by typing
"tail .bash_history" and press Enter.
$ tail .bash_history
3. Type history and press Enter. Then it will be seen
that the last line is history command and the previous
line is tail .bash_history.
The history command is up to date, as it is stored on
system memory.
$ history
https://github.com/syaifulahdan/os­practice|Operating System Practice |27 to 52 
4. Type the following command
$ echo ‘Ini perintah saya’
5. Type the following command
https://github.com/syaifulahdan/os­practice|Operating System Practice |28 to 52 
4. Type the following command.
5. Log out and log in again as the same user.
Type history and press Enter, Then the command
echo 'This my command' will be on the last line.
See the .bash_history file, then the command will be
in the .bash_history file.
$ echo 'This is my command'
$ history
$ tail .bash_history
https://github.com/syaifulahdan/os­practice|Operating System Practice |29 to 52 
7. To see how many of the history commands that
exist in the following file and output that comes out
similar below
$ history|less
6. Type history  |  less to see the last history
command on screen, Press spacebar to see more files.
To exit press q
$ wc –l .bash_history
1000 .bash_history
https://github.com/syaifulahdan/os­practice|Operating System Practice |30 to 52 
8. The output shows that 1000 history commands are
stored in the history file.
To see the range (limit) history command used
HISTSIZE variable. To see the history range type as
follows
$ set|grep HISTSIZE
9. If you want to enlarge the file history range, change
the variable
HISTSIZE on a startup script called .bashrc in the
home directory.
$ echo ‘HISTSIZE=5000’ >> .bashrc
https://github.com/syaifulahdan/os­practice|Operating System Practice |31 to 52 
10. Log out and log in again as the same user. View
HISTSIZE variable changes.
$ set|grep HISTSIZE
11. Type a history command several times, then this
command will be stored in BASH history even though
the command is typed the same.
12. You can configure BASH to not add commands to
history if the commands you type are the same as
before.
This is done by adding the HISTCONTROL variable
and given the value of ignoredups in the .bashrc file
$ echo ‘HISTCONTROL=ignoredups’ >> .bashrc
https://github.com/syaifulahdan/os­practice|Operating System Practice |32 to 52 
13. Log out and log in again as the same user. Type
history a few times and notice how many times the
history appears.
https://github.com/syaifulahdan/os­practice|Operating System Practice |33 to 52 
Experiment 4 : Change Shell Prompt
1. The Bash shell prompt is configured by setting the
PS1 variable value.
In addition to displaying static strings as prompts, you
can display to be dynamic.
For example, if you want to show current directory or
current time. Type PS1='t:' and press Enter to display
system time in 24 hour format as Bash prompt.
Format in HH: MM: SS
$ PS1=”t:”
https://github.com/syaifulahdan/os­practice|Operating System Practice |34 to 52 
3. Log out and log in again as the same user. Type
history a few times and notice how many times the
history appears.
$ PS1=”t:”
4. Most people want the Bash prompt to display the
current working directory.

The directory can be displayed in the form of an
entire path or just a directory name.

The  w character displays only the directory name.
If current directory is the home directory, then the
prompt appears ~:.
$ PS1=”t:”
https://github.com/syaifulahdan/os­practice|Operating System Practice |35 to 52 
5. Type cd /usr/sbin to see the /usr/sbin prompt:
$ cd /usr/sbin
6. Type PS1 = ' W:' to see the sbin prompt:
$ PS1=’W:’
https://github.com/syaifulahdan/os­practice|Operating System Practice |36 to 52 
7. There are several other BASH prompts that can be
changed, ie PS2, PS3 and PS4.

Prompt PS2 is used as a secondary prompt. To see how it's
used, type echo 'Hello (without ending the quote) and
press Enter.
A symbol larger than (>) will appear. This tells us that
BASH is waiting for you to complete the order.
$ echo ’Hello
>’

Type in quote cover (') and press Enter. This
command will complete the PS2 prompt, the word
"Hello," appears followed by the PS1 prompt on the
new line.
https://github.com/syaifulahdan/os­practice|Operating System Practice |37 to 52 
8. You can change the PS2 prompt like changing the
PS1 prompt. Type the following command:
$ PS2 = “Done entering your command:'”
>’
9. Then type echo 'Hello (without ending the quote)
and press Enter.

On the next line will appear. Done entering your
command :. Then type quote cover (') and press
Enter.

If the command is complete, then the word Hello will
appear followed by the PS1 prompt on the new line.
$ echo “Hello
Done entering your command:’
https://github.com/syaifulahdan/os­practice|Operating System Practice |38 to 52 
10. The BASH prompt can be displayed in sequence
by setting the color-setting string. For example, the
BASH prompt is set with w$, will displays the
current working directory followed by $ (or # if you
login as root).
For setting the color to blue type the following:
$ PS1=”033[0;34mw$ 033[0;37m”
11. To get a red prompt type the following:
$ PS1=”033[0;31mw$ 033[0;37m”
https://github.com/syaifulahdan/os­practice|Operating System Practice |39 to 52 
10. The BASH prompt can be displayed in sequence
by setting the color-setting string. For example, the
BASH prompt is set with w$, will displays the
current working directory followed by $ (or # if you
login as root).
For setting the color to blue type the following:
$ PS1=”033[0;34mw$ 033[0;37m”
11. To get a red prompt type the following:
$ PS1=”033[0;31mw$ 033[0;37m”
30 = black, 31 = red, 32 = green, 34 = blue, 35 = purple, 36 = cyan, 37 = white.
https://github.com/syaifulahdan/os­practice|Operating System Practice |40 to 52 
12. If you want multiple colors, type the following
command:
$ PS1=”033[0;31mw033[0;32m$ 033[0;37m”
13. You can display visual attributes such as brighter,
blinking and the opposite color. To display a brighter
prompt, the control attribute is replaced by 1, like
the following command:
$ PS1=”033[1;34mw033[1;32m$ 033[0;37m”
https://github.com/syaifulahdan/os­practice|Operating System Practice |41 to 52 
14. To display a prompt with the opposite color, the
control attribute is replaced by 7, like the following
command:
15. To display a flashing prompt, the control attribute
is replaced by 5, like the following command:
$ PS1=”033[7;34mw033[7;32m$ 033[0;37m”
$ PS1=”033[7;34mw033[7;32m$ 033[0;37m”
https://github.com/syaifulahdan/os­practice|Operating System Practice |42 to 52 
Experiment 5 : Adding automation to
Prompt Shell
1. Make sure you are in the home directory
$ cd ~
2. Create a simple script to sort the file list. You can
use the text editor, but since it is only one line, use the
echo command to create the file.
$ echo ’sort ~/list > ~/r13; mv ~/r13 ~/list’ > ~/sorter
3. Make the script file above to be an executable file
$ chmod +x sorter
https://github.com/syaifulahdan/os­practice|Operating System Practice |43 to 52 
4. Run the sorter program above each Bash shell
displaying the PS1 prompt. To do this, create a
PROMPT_COMMAND variable where the value is
the name of the sorter program.
PROMPT_COMMAND=~/sorter
5. Type echo 'John Smith: 13001' >> list and press
Enter. If the list file does not exist, it will be created
automatically, but if it exists, the string 'John Smith:
13001' will be added.
$ echo ’John Smith:13001’>>list
https://github.com/syaifulahdan/os­practice|Operating System Practice |44 to 52 
6. Type cat list and press Enter. Then you will see the
contents of the file list. At this time, the file may have
only one line so it can not be seen whether the file has
been sorted.
$ cat list
7. Enter some command similar to point 5 but with
different names and numbers. Then type cat list and press
Enter.
$ echo ’debian:13002’>>list
$ echo ’suse:13003’>>list
$ echo ’xandros:13004’>>list
$ echo ’centos Bob:13005’>>list
$ echo ’mint:13006’>>list
$ echo ’Squid:13007’>>list
https://github.com/syaifulahdan/os­practice|Operating System Practice |45 to 52 
8. If you do not want Shell Bash to show the file all the
time, you do not need to add the PROMPT_COMMAND =~/ 
sorter variable in the configuration file like .bashrc.
If you want BASH to stop running the sorter program, then
type the PROMPT_COMMAND = variable and press
Enter or log out and login again.
$ PROMPT_COMMAND=
https://github.com/syaifulahdan/os­practice|Operating System Practice |46 to 52 
E. Exercise
https://github.com/syaifulahdan/os­practice|Operating System Practice |47 to 52 

Exercise : Practice 5A
Try the following command:
 $ history
   $ tail .bash_history
   $ history|less
   $ wc –l .bash_history
   $ set|grep HISTSIZE
   $ echo ‘HISTCONTROL=ignoredups’ >> .bashrc
   $ chmod +x sorter
   $ PS1=”033[7;34mw033[7;32m$ 033[0;37m”
   $ PS2=”welcome to the jungle:”
   $ PS1=’W:’
https://github.com/syaifulahdan/os­practice|Operating System Practice |48 to 52 

Practice Report : Practice 5A
1 Analyze your experimental results.
2 Do the above exercises and analyze the results.
3 Give a conclusion from this lab.
https://github.com/syaifulahdan/os­practice|Operating System Practice |49 to 52 

“Pleasure in a job makes perfection on the results 
achieved”. Aristoteles

“Believe you can. You're halfway”. Theodore Roosevelt

“You might be able to delay, but time will not wait”. 
Benjamin Franklin 

“The effort will work if someone does not give up”. 
Napoleon Hill

“Opportunity to find a better strength in us arises 
when life seems to be very challenging”. Joseph 
Campbell

More Related Content

PDF
Operating System Practice : Meeting 8- bekerja dengan bash shell-b-slide
PDF
Dependency management with Composer
PPTX
PPT
嵌入式Linux課程-GNU Toolchain
PDF
Ansible project-deploy
PDF
Scripting and the shell in LINUX
PPT
Composer - Package Management for PHP. Silver Bullet?
PPT
Autoconf&Automake
Operating System Practice : Meeting 8- bekerja dengan bash shell-b-slide
Dependency management with Composer
嵌入式Linux課程-GNU Toolchain
Ansible project-deploy
Scripting and the shell in LINUX
Composer - Package Management for PHP. Silver Bullet?
Autoconf&Automake

What's hot (20)

PPT
Unix Shell Scripting Basics
PPT
Learn flask in 90mins
PDF
Create your own composer package
PDF
KEY
Crafting Beautiful CLI Applications in Ruby
PDF
Don't Fear the Autotools
PDF
PDF
Composer the right way - SunshinePHP
PDF
Git::Hooks
PPTX
Mastering unix
PDF
Ten common mistakes made with Functional Java JBCNConf18
PDF
Building robust and friendly command line applications in go
ODP
OpenGurukul : Language : Shell Scripting
PDF
Unix Shell Scripting
PDF
Composer for Busy Developers - php|tek13
PDF
Common mistakes functional java vjug
PDF
Common mistakes functional java | Oracle Code One 2018
PDF
Dependencies Managers in C/C++. Using stdcpp 2014
PPT
Unix Shell Scripting Basics
PPTX
PHP Dependency Management with Composer
Unix Shell Scripting Basics
Learn flask in 90mins
Create your own composer package
Crafting Beautiful CLI Applications in Ruby
Don't Fear the Autotools
Composer the right way - SunshinePHP
Git::Hooks
Mastering unix
Ten common mistakes made with Functional Java JBCNConf18
Building robust and friendly command line applications in go
OpenGurukul : Language : Shell Scripting
Unix Shell Scripting
Composer for Busy Developers - php|tek13
Common mistakes functional java vjug
Common mistakes functional java | Oracle Code One 2018
Dependencies Managers in C/C++. Using stdcpp 2014
Unix Shell Scripting Basics
PHP Dependency Management with Composer
Ad

Similar to Operating System Practice : Meeting 7- working with bash shell-a-slide (20)

PPTX
Licão 05 scripts exemple
ODP
ODP
Linuxppt
PDF
Linux programming - Getting self started
ODP
ODP
NYPHP March 2009 Presentation
PPTX
Licão 02 shell basics bash intro
DOCX
BACKGROUND A shell provides a command-line interface for users. I.docx
DOCX
OverviewIn this assignment you will write your own shell i.docx
PPT
Purdue CS354 Operating Systems 2008
ODP
Shellscripting
DOCX
1 of 9 CSCE 3600 Systems Programming Major Assignm.docx
PPT
Tame Your Build And Deployment Process With Hudson, PHPUnit, and SSH
PPTX
Lab 7 - Bash Script.pptx
PDF
PPTX
Using Vi Editor.pptx
PPTX
Using Vi Editor.pptx
DOCX
Generating keyboard in raspberry pi
PPTX
Raspberry pi Part 25
PDF
Operating System Practice : Meeting 9 pemrograman shell - a -slide
Licão 05 scripts exemple
Linuxppt
Linux programming - Getting self started
NYPHP March 2009 Presentation
Licão 02 shell basics bash intro
BACKGROUND A shell provides a command-line interface for users. I.docx
OverviewIn this assignment you will write your own shell i.docx
Purdue CS354 Operating Systems 2008
Shellscripting
1 of 9 CSCE 3600 Systems Programming Major Assignm.docx
Tame Your Build And Deployment Process With Hudson, PHPUnit, and SSH
Lab 7 - Bash Script.pptx
Using Vi Editor.pptx
Using Vi Editor.pptx
Generating keyboard in raspberry pi
Raspberry pi Part 25
Operating System Practice : Meeting 9 pemrograman shell - a -slide
Ad

More from Syaiful Ahdan (20)

PDF
Sertifikat EC00202128391
PDF
SP2JPB - Aplikasi Sistem Pelayanan Pemesanan Jasa Perbaikan Pada Bengkel Alam...
PDF
Sertifikat ec00202059774
PDF
Sertifikat ec00202059775
PDF
Sertifikat EC00202045078
PDF
Sertifikat EC00202044723
PDF
Sertifikat EC00202023523
PDF
Sertifikat EC00201826309
PDF
Sertifikat EC00202023149
PDF
Sertifikat EC00202022868
PDF
Sertifikat EC00202021343
PDF
Sertifikat EC00202022755
PDF
Sertifikat EC00201987196
PDF
Sertifikat EC00201856484
PDF
Sertifikat EC00201856352
PDF
Sertifikat EC00201856994
PDF
Sertifikat EC00201856895
PDF
Meeting 2 introdcution network administrator
PDF
Pertemuan 5
PDF
Pertemuan 4
Sertifikat EC00202128391
SP2JPB - Aplikasi Sistem Pelayanan Pemesanan Jasa Perbaikan Pada Bengkel Alam...
Sertifikat ec00202059774
Sertifikat ec00202059775
Sertifikat EC00202045078
Sertifikat EC00202044723
Sertifikat EC00202023523
Sertifikat EC00201826309
Sertifikat EC00202023149
Sertifikat EC00202022868
Sertifikat EC00202021343
Sertifikat EC00202022755
Sertifikat EC00201987196
Sertifikat EC00201856484
Sertifikat EC00201856352
Sertifikat EC00201856994
Sertifikat EC00201856895
Meeting 2 introdcution network administrator
Pertemuan 5
Pertemuan 4

Recently uploaded (20)

PPTX
Presentation on HIE in infants and its manifestations
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PPTX
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
PDF
RMMM.pdf make it easy to upload and study
PPTX
Cell Types and Its function , kingdom of life
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
Microbial disease of the cardiovascular and lymphatic systems
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PPTX
Cell Structure & Organelles in detailed.
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PPTX
Institutional Correction lecture only . . .
PPTX
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Presentation on HIE in infants and its manifestations
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
2.FourierTransform-ShortQuestionswithAnswers.pdf
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
RMMM.pdf make it easy to upload and study
Cell Types and Its function , kingdom of life
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Microbial disease of the cardiovascular and lymphatic systems
Final Presentation General Medicine 03-08-2024.pptx
Abdominal Access Techniques with Prof. Dr. R K Mishra
FourierSeries-QuestionsWithAnswers(Part-A).pdf
202450812 BayCHI UCSC-SV 20250812 v17.pptx
Cell Structure & Organelles in detailed.
Chinmaya Tiranga quiz Grand Finale.pdf
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
Institutional Correction lecture only . . .
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
Module 4: Burden of Disease Tutorial Slides S2 2025
3rd Neelam Sanjeevareddy Memorial Lecture.pdf

Operating System Practice : Meeting 7- working with bash shell-a-slide

  • 1. https://github.com/syaifulahdan/os­practice|Operating System Practice |1 to 52  OPERATING SYSTEMS PRACTICE Working With Bash Shell Practice : 5A  History on Bash Shell  Creating a Bash Shell Script https://github.com/syaifulahdan/os­practice|
  • 2. https://github.com/syaifulahdan/os­practice|Operating System Practice |2 to 52  A. Objectives 1. Understanding the shell on Linux operating system. 2. Using feature history in Bash Shell. 3. Change the history feature in Bash Shell. 4. the shell prompt. 5. Configure Bash Shell to run scripts automatically. 6. Create and execute simple shell scripts via vi editor. 7. Understand the job control. 8. Understand the stack. 9. Using aliases
  • 4. https://github.com/syaifulahdan/os­practice|Operating System Practice |4 to 52  1. SHELL Shell is a Command executive, meaning the program awaits the user's instructions, checks the syntax of the given instruction, then executes the command. Shell is marked with a prompt. For user use prompt $ and for superuser use promp #. shell type:  /bin/sh Developed by UNIX Berkeley known as C-Shell  /bin/csh Bourne shell, designed by Steve Bourne of AT & T  /bin/bash Compatible with Bourne Shell and also adapting Korn-Shell's ability. The fundamental difference between Shell is resolved almost non- existent, except in programming and editing facilities.
  • 5. https://github.com/syaifulahdan/os­practice|Operating System Practice |5 to 52  1. SHELL Shell is a Command executive, meaning the program awaits the user's instructions, checks the syntax of the given instruction, then executes the command. Shell is marked with a prompt. For user use prompt $ and for superuser use promp #. shell type:  /bin/sh Developed by UNIX Berkeley known as C-Shell  /bin/csh Bourne shell, designed by Steve Bourne of AT & T  /bin/bash Compatible with Bourne Shell and also adapting Korn-Shell's ability. The fundamental difference between Shell is resolved almost non- existent, except in programming and editing facilities.
  • 6. https://github.com/syaifulahdan/os­practice|Operating System Practice |6 to 52  2. PROFILE At login time, the program will run some program that is: 1. /etc/profile It contains a shell script that applies to all Linux users. 2. Profile for each user In the home directory, the login will first check the .bash_profile file. If no, then the .bash_login file will be searched. If .bash_login does not exist, then look for file named .profile 3. .bashrc This file will be executed for switching from one shell to another through su. 4. .bash_logout At logout, bash will search for file .bash_logout. When present, the file will be executed before logout
  • 7. https://github.com/syaifulahdan/os­practice|Operating System Practice |7 to 52  The contents of / etc / profile: # System wide environment and startup programs # Functions and aliases go in /etc/bashrc PATH=”$PATH:/usr/X11R6/bin” PS1=”[u@h W]$ “ umask 022 USER=’id –un’ LOGNAME=$USER MAIL=”/var/spool/mail/$USER” HOSTNAME=’/bi n/hostname’ HISTSIZE=1000 HISTFILESIZE=1000 Export  PATH  PS1  HOSTNAME  HISTSIZE  HISTFILESIZE  USER  LOGNAME MAIL
  • 8. https://github.com/syaifulahdan/os­practice|Operating System Practice |8 to 52  PATH merupakan daftar nama direktori. Bila sebuah instruksi diberikan dari prompt shell, maka instruksi tersebut akan dicari pada daftar tersebut. PS1 adalah prompt dimana u = Nama User h = Nama Host W = Nama working direktory
  • 9. https://github.com/syaifulahdan/os­practice|Operating System Practice |9 to 52  3. HISTORY History is adapted from C-Shell, which is a record of all the instructions that have so far been done. These records can be viewed as history, then can be re- selected, edited and executed. History allows the user to re-edit complex and lengthy instructions, especially when errors occur in the writing of instructions and parameters. ^P (Ctrl-P) see previous instructions ^N (Ctrl-N see the next instruction !! execution of previous instructions !! –3 3 previous instructions will be repeated !!88 repeat instruction no 88
  • 10. https://github.com/syaifulahdan/os­practice|Operating System Practice |10 to 52  4. BASH-SCRIPT Bash-script is a file that contains a collection of executable programs. For bash script execution use . before the bash-script file which means shell and sign execution ./ means the bash-script file is in the actual directory.
  • 11. https://github.com/syaifulahdan/os­practice|Operating System Practice |11 to 52  5. JOB CONTROL Job is a program execution given to the kernel. A Job is deemed complete, when the execution of the program ends. Execution Job is the same as the execution of the program, both Background process and Foreground process.
  • 12. https://github.com/syaifulahdan/os­practice|Operating System Practice |12 to 52  5. EDITOR vi Vi is a full screen editor, meaning the editor can take advantage of the full-screen facility. Vi has 2 pieces mode, namely:  Command line The vi editor interprets the input as an instruction to be executed by the editor, examples such as searching text, changing text automatically and others.  Editing The vi editor interprets the output as text to be inserted into the buffer editor. At the bottom of the screen will display the text "INSERTING".
  • 13. https://github.com/syaifulahdan/os­practice|Operating System Practice |13 to 52  At the beginning of vi run, the program enters command mode. With pressing the "i" button will then enter editing. To return to command mode, press the Esc key. The keys of the vi editor text can be seen in the table as follows: H Move cursor to left one character J Move the cursor to the right of one character K Pinda h kursor ke atas L Move the cursor down O Insert text (one line after cursor position) To exit the 5 insert lock models next to this and activate other keys, then we must press the Esc key first I Insert text (to the left of the cursor position) A Insert text (to the right of the cursor position) I (Shift i) Insert text (in the starting position of the line) A (Shift a) Insert text (at the end of the line)
  • 14. https://github.com/syaifulahdan/os­practice|Operating System Practice |14 to 52  X Deleting 1 letter (to the right of the cursor position) Dw Delete 1 word (to the right of the cursor position) Dd Removing 1 row (to the right of cursor position) Yy Copying 1 line 2yy Copying 2 lines P (Paste) Displays a sentence line that has been copied with yy key. Cw Replace 1 word that has been written to the right of the cursor position with another word Cc Replace 1 sentence line that has been written to the right of the cursor position with another sentence ctrl- b Reverse one screen ctrl- f Forward one screen ctrl- d Forward half screen B Move the cursor to the left of one word W Move the cursor to the right of one word ^ Go to the beginning of the line $ Go to the end of the line U Cancel the last command U Undoes all text changes on the line where the cursor is located :! Quit temporarily from vi editor and execute another command
  • 15. https://github.com/syaifulahdan/os­practice|Operating System Practice |15 to 52  :wq Write and quite, save the file and exit :q! Exit vi without saving :se all Displays all set status options :se nu Displays the line number on the left of the screen /string Looking for strings forward ?string Looking for strings toward the back N Forward the search for the same direction N Continue searching for different directions
  • 17. https://github.com/syaifulahdan/os­practice|Operating System Practice |17 to 52  1 Login as user. 2 Open the Console Terminal and do the experiments below and then analyze the results of the experiment. 3 Conduct the experiments below and then analyze the experimental results. 4 Complete the practice questions.
  • 19. https://github.com/syaifulahdan/os­practice|Operating System Practice |19 to 52  Experiment 1 : Profile 1. The .bash_profile file runs on the user's home directory login. The .bash_profile file is a hidden file, so to see it use option a on the ls instruction. $ ls –a $ more .bash_profile 2. The .bash_logout file will be executed shortly before logout, functioning as a house clearing job, which means to clear everything, for example deleting temporary file or other job. View the .bash_logout file with instructions $ cat .bash_logout
  • 20. https://github.com/syaifulahdan/os­practice|Operating System Practice |20 to 52  Experiment 2 : Using Feature History Bash 1. Bash shell keeps the "history" command used before. You can do history in some way. The easiest way is to use the Up Arrow, then the previous command will be displayed. 2. Next, give the Bash shell some commands to remember. Enter the following command and press Enter on each line. $ cd $ ls –l /etc $ ls –l $ whoami $ who
  • 21. https://github.com/syaifulahdan/os­practice|Operating System Practice |21 to 52  3. To check if this command is added to the history, it can use the history command to see all the commands ever inserted.. $ history 4. You can select the previous command by using Up Arrow, but this is not efficient for increasing orders. A simple way of using numbers in history commands or searching for them. To select and execute commands by number, enter the key! followed by the command number.. $ !<Nomor Perintah>      Contoh : !780
  • 22. https://github.com/syaifulahdan/os­practice|Operating System Practice |22 to 52  3. To check if this command is added to the history, it can use the history command to see all the commands ever inserted.. $ history 4. You can select the previous command by using Up Arrow, but this is not efficient for increasing orders. A simple way of using numbers in history commands or searching for them. To select and execute commands by number, enter the key! followed by the command number.. $ !<Nomor Perintah>      Contoh : !780
  • 23. https://github.com/syaifulahdan/os­practice|Operating System Practice |23 to 52  5. You can search for commands by including the desired commands. For example !? Etc ?! will execute the previously used ls ­l /etc command. $ !?etc? 6. Then use the history command, it will show the ls  ­l /etc command instead of !? Etc?. $ history 7. If the string is not found in the history command there will be an error message. $ !?wombat99?
  • 24. https://github.com/syaifulahdan/os­practice|Operating System Practice |24 to 52  8. If typed !Who then it is executed is the who command. But if you type !Whoa then the whoami command is executed. $ !who $ !whoa 9. You can replace string in history command, especially on long command. - For example type cat /bin /bash | strings | grep shell | less and press Enter. It will show all the strings in the /bin  /bash file containing the word "shell". To exit press q. - If you want to display the word "alias", then you do not have to type long command again, but just type ^shell^alias^ and press Enter it will replace the word "shell" with "alias". $ cat /bin/bash | strings | grep shell | less $ ^shell^alias^
  • 25. https://github.com/syaifulahdan/os­practice|Operating System Practice |25 to 52  Experiment 3 : Change Feature History Bash 1. Bash shell will keep the history command even after logging out and logging in again. The .bash_history file stores the history file contained in the home directory. $ cd
  • 26. https://github.com/syaifulahdan/os­practice|Operating System Practice |26 to 52  2. View a few lines in the .bash_history file by typing "tail .bash_history" and press Enter. $ tail .bash_history 3. Type history and press Enter. Then it will be seen that the last line is history command and the previous line is tail .bash_history. The history command is up to date, as it is stored on system memory. $ history
  • 27. https://github.com/syaifulahdan/os­practice|Operating System Practice |27 to 52  4. Type the following command $ echo ‘Ini perintah saya’ 5. Type the following command
  • 28. https://github.com/syaifulahdan/os­practice|Operating System Practice |28 to 52  4. Type the following command. 5. Log out and log in again as the same user. Type history and press Enter, Then the command echo 'This my command' will be on the last line. See the .bash_history file, then the command will be in the .bash_history file. $ echo 'This is my command' $ history $ tail .bash_history
  • 29. https://github.com/syaifulahdan/os­practice|Operating System Practice |29 to 52  7. To see how many of the history commands that exist in the following file and output that comes out similar below $ history|less 6. Type history  |  less to see the last history command on screen, Press spacebar to see more files. To exit press q $ wc –l .bash_history 1000 .bash_history
  • 30. https://github.com/syaifulahdan/os­practice|Operating System Practice |30 to 52  8. The output shows that 1000 history commands are stored in the history file. To see the range (limit) history command used HISTSIZE variable. To see the history range type as follows $ set|grep HISTSIZE 9. If you want to enlarge the file history range, change the variable HISTSIZE on a startup script called .bashrc in the home directory. $ echo ‘HISTSIZE=5000’ >> .bashrc
  • 31. https://github.com/syaifulahdan/os­practice|Operating System Practice |31 to 52  10. Log out and log in again as the same user. View HISTSIZE variable changes. $ set|grep HISTSIZE 11. Type a history command several times, then this command will be stored in BASH history even though the command is typed the same. 12. You can configure BASH to not add commands to history if the commands you type are the same as before. This is done by adding the HISTCONTROL variable and given the value of ignoredups in the .bashrc file $ echo ‘HISTCONTROL=ignoredups’ >> .bashrc
  • 32. https://github.com/syaifulahdan/os­practice|Operating System Practice |32 to 52  13. Log out and log in again as the same user. Type history a few times and notice how many times the history appears.
  • 33. https://github.com/syaifulahdan/os­practice|Operating System Practice |33 to 52  Experiment 4 : Change Shell Prompt 1. The Bash shell prompt is configured by setting the PS1 variable value. In addition to displaying static strings as prompts, you can display to be dynamic. For example, if you want to show current directory or current time. Type PS1='t:' and press Enter to display system time in 24 hour format as Bash prompt. Format in HH: MM: SS $ PS1=”t:”
  • 34. https://github.com/syaifulahdan/os­practice|Operating System Practice |34 to 52  3. Log out and log in again as the same user. Type history a few times and notice how many times the history appears. $ PS1=”t:” 4. Most people want the Bash prompt to display the current working directory.  The directory can be displayed in the form of an entire path or just a directory name.  The w character displays only the directory name. If current directory is the home directory, then the prompt appears ~:. $ PS1=”t:”
  • 35. https://github.com/syaifulahdan/os­practice|Operating System Practice |35 to 52  5. Type cd /usr/sbin to see the /usr/sbin prompt: $ cd /usr/sbin 6. Type PS1 = ' W:' to see the sbin prompt: $ PS1=’W:’
  • 36. https://github.com/syaifulahdan/os­practice|Operating System Practice |36 to 52  7. There are several other BASH prompts that can be changed, ie PS2, PS3 and PS4.  Prompt PS2 is used as a secondary prompt. To see how it's used, type echo 'Hello (without ending the quote) and press Enter. A symbol larger than (>) will appear. This tells us that BASH is waiting for you to complete the order. $ echo ’Hello >’  Type in quote cover (') and press Enter. This command will complete the PS2 prompt, the word "Hello," appears followed by the PS1 prompt on the new line.
  • 37. https://github.com/syaifulahdan/os­practice|Operating System Practice |37 to 52  8. You can change the PS2 prompt like changing the PS1 prompt. Type the following command: $ PS2 = “Done entering your command:'” >’ 9. Then type echo 'Hello (without ending the quote) and press Enter.  On the next line will appear. Done entering your command :. Then type quote cover (') and press Enter.  If the command is complete, then the word Hello will appear followed by the PS1 prompt on the new line. $ echo “Hello Done entering your command:’
  • 38. https://github.com/syaifulahdan/os­practice|Operating System Practice |38 to 52  10. The BASH prompt can be displayed in sequence by setting the color-setting string. For example, the BASH prompt is set with w$, will displays the current working directory followed by $ (or # if you login as root). For setting the color to blue type the following: $ PS1=”033[0;34mw$ 033[0;37m” 11. To get a red prompt type the following: $ PS1=”033[0;31mw$ 033[0;37m”
  • 39. https://github.com/syaifulahdan/os­practice|Operating System Practice |39 to 52  10. The BASH prompt can be displayed in sequence by setting the color-setting string. For example, the BASH prompt is set with w$, will displays the current working directory followed by $ (or # if you login as root). For setting the color to blue type the following: $ PS1=”033[0;34mw$ 033[0;37m” 11. To get a red prompt type the following: $ PS1=”033[0;31mw$ 033[0;37m” 30 = black, 31 = red, 32 = green, 34 = blue, 35 = purple, 36 = cyan, 37 = white.
  • 40. https://github.com/syaifulahdan/os­practice|Operating System Practice |40 to 52  12. If you want multiple colors, type the following command: $ PS1=”033[0;31mw033[0;32m$ 033[0;37m” 13. You can display visual attributes such as brighter, blinking and the opposite color. To display a brighter prompt, the control attribute is replaced by 1, like the following command: $ PS1=”033[1;34mw033[1;32m$ 033[0;37m”
  • 41. https://github.com/syaifulahdan/os­practice|Operating System Practice |41 to 52  14. To display a prompt with the opposite color, the control attribute is replaced by 7, like the following command: 15. To display a flashing prompt, the control attribute is replaced by 5, like the following command: $ PS1=”033[7;34mw033[7;32m$ 033[0;37m” $ PS1=”033[7;34mw033[7;32m$ 033[0;37m”
  • 42. https://github.com/syaifulahdan/os­practice|Operating System Practice |42 to 52  Experiment 5 : Adding automation to Prompt Shell 1. Make sure you are in the home directory $ cd ~ 2. Create a simple script to sort the file list. You can use the text editor, but since it is only one line, use the echo command to create the file. $ echo ’sort ~/list > ~/r13; mv ~/r13 ~/list’ > ~/sorter 3. Make the script file above to be an executable file $ chmod +x sorter
  • 43. https://github.com/syaifulahdan/os­practice|Operating System Practice |43 to 52  4. Run the sorter program above each Bash shell displaying the PS1 prompt. To do this, create a PROMPT_COMMAND variable where the value is the name of the sorter program. PROMPT_COMMAND=~/sorter 5. Type echo 'John Smith: 13001' >> list and press Enter. If the list file does not exist, it will be created automatically, but if it exists, the string 'John Smith: 13001' will be added. $ echo ’John Smith:13001’>>list
  • 44. https://github.com/syaifulahdan/os­practice|Operating System Practice |44 to 52  6. Type cat list and press Enter. Then you will see the contents of the file list. At this time, the file may have only one line so it can not be seen whether the file has been sorted. $ cat list 7. Enter some command similar to point 5 but with different names and numbers. Then type cat list and press Enter. $ echo ’debian:13002’>>list $ echo ’suse:13003’>>list $ echo ’xandros:13004’>>list $ echo ’centos Bob:13005’>>list $ echo ’mint:13006’>>list $ echo ’Squid:13007’>>list
  • 45. https://github.com/syaifulahdan/os­practice|Operating System Practice |45 to 52  8. If you do not want Shell Bash to show the file all the time, you do not need to add the PROMPT_COMMAND =~/  sorter variable in the configuration file like .bashrc. If you want BASH to stop running the sorter program, then type the PROMPT_COMMAND = variable and press Enter or log out and login again. $ PROMPT_COMMAND=
  • 47. https://github.com/syaifulahdan/os­practice|Operating System Practice |47 to 52   Exercise : Practice 5A Try the following command:  $ history    $ tail .bash_history    $ history|less    $ wc –l .bash_history    $ set|grep HISTSIZE    $ echo ‘HISTCONTROL=ignoredups’ >> .bashrc    $ chmod +x sorter    $ PS1=”033[7;34mw033[7;32m$ 033[0;37m”    $ PS2=”welcome to the jungle:”    $ PS1=’W:’
  • 48. https://github.com/syaifulahdan/os­practice|Operating System Practice |48 to 52   Practice Report : Practice 5A 1 Analyze your experimental results. 2 Do the above exercises and analyze the results. 3 Give a conclusion from this lab.
  • 49. https://github.com/syaifulahdan/os­practice|Operating System Practice |49 to 52   “Pleasure in a job makes perfection on the results  achieved”. Aristoteles  “Believe you can. You're halfway”. Theodore Roosevelt  “You might be able to delay, but time will not wait”.  Benjamin Franklin   “The effort will work if someone does not give up”.  Napoleon Hill  “Opportunity to find a better strength in us arises  when life seems to be very challenging”. Joseph  Campbell