Main Page
Linux Bash Shell Scripting Introduction
Tutorial This tutorial is a
beginners handbook for
new Linux users / Sys
Written by Vivek Gite. Copyright 1999-2017 Vivek Gite and
admins and school
its contributors. Some rights reserved.
students studying Linux
or computer science. This
book is licensed under
"Creative Commons
Chapter 1: Quick Introduction to Attribution
Noncommercial Share
Linux Alike 3.0 Unported".
What Is Linux?
Who created Linux? Getting Started
Where can I download Linux?
How do I Install Linux? We are looking for
Linux usage in everyday life contributors to
What is Linux Kernel? help correct typos,
What is Linux Shell? enhanced and edit
Unix philosophy the tutorial. Take
But how do you use the shell? the time to read
What is a Shell Script or shell scripting? the tutorial. All
Why shell scripting? registered user can
Chapter 1 Challenges edit or post new
sections. If you are
new to the wiki
Chapter 2: Getting Started With Shell please check out
Programming the excellent
Mediawiki editing
The bash shell guide and use the
Shell commands Sandbox for
The role of shells in the Linux environment testing purpose.
Other standard shells o Update :
Write a simple shell script - "Hello World!" I'm now
o Starting a script with Shebang line (#!) allowing
o Comments in a script anonymous
o Setting up permissions on a script user to edit
o Execute a script the tutorial.
o Debug a script Don't add
Chapter 2 Challenges nasty
spam. No
point
putting in
personal
details or
Chapter 3:The Shell Variables and links, I will
remove
Environment them and
ban your
Variables in shell IP. Try and
o Assign values to shell variables edit in
o Default shell variables value English
o Rules for Naming variable name and please
o Display the value of shell variables stick to the
o Quoting point!
o The export statement Thank
o Unset shell and environment variables you!!
o Getting User Input Via Keyboard
Perform arithmetic operations PDF Version
o Create an integer variable
o Create the constants variable PDF version not
Bash variable existence check available at this
Customize the bash shell environments time.
o Recalling command history
o Path name expansion Have a Question About
o Create and use aliases Shell Scripting?
o The tilde expansion
o Startup scripts If you'd like to contact us
Using aliases about helping you with a
Changing bash prompt Linux shell scripting
Setting shell options problem just click here to
Setting system wide shell options visit our excellent tech
Chapter 3 Challenges support forum.
Chapter 4: Conditionals Execution Download Bash
(Decision Making) Shell
Bash structured language constructs The current
Test command production
if structures to execute code based on a condition versions are Bash
If..else..fi 3.x and 4.x. Grab
Nested ifs it from the official
Multilevel if-then-else website.
The exit status of a command
Conditional execution
Logical AND && Bash
Logical OR || Documentation
Logical Not !
Conditional expression using [ (portable version) Bash's standard
Conditional expression using [[ documentation is
Numeric comparison substantial;
String comparison download your
File attributes comparisons
Shell command line parameters
o How to use positional parameters own copy or
o Parameters Set by the Shell browse it online!
o Create usage messages You may also find
o Exit command Bash quick
The case statement reference quite
o Dealing with case sensitive pattern useful.
Chapter 4 Challenges The Bash FAQ,
version 4.01, for
Bash version 4.0.
Chapter 5: Bash Loops
The for loop statement Bash and
Nested for loop statement
The while loop statement
friends books
o Use of : to set infinite while loop
Learning the bash
The until loop statement
Shell: Unix Shell
The select loop statement
Programming In a
o Exit the select loop statement
Nutshell
Using the break statement
(O'Reilly)
Using the continue statement
bash Cookbook:
Command substitution
Solutions and
Chapter 5 Challenges
Examples for bash
Users -
Chapter 6: Shell Redirection Cookbooks
(O'Reilly)
Input and Output Linux Shell
Standard input Scripting with
Standard output Bash (Sams)
Standard error Mastering Unix
Empty file creation Shell Scripting:
/dev/null discards unwanted output Bash, Bourne, and
here documents Korn Shell
here strings Scripting for
Redirection of standard error Programmers,
Redirection of standard output System
Appending redirected output Administrators,
Redirection of both standard error and output and UNIX Gurus
Writing output to files (Wiley)
Assigns the file descriptor (fd) to file for output Learning the vi
Assigns the file descriptor (fd) to file for input and Vim Editors
Closes the file descriptor (fd) (O'Reilly)
Opening the file descriptors for reading and writing
Reads from the file descriptor (fd)
Executes commands and send output to the file
Bash IDE
descriptor (fd)
vim or vi.
Chapter 6 Challenges
gedit (see how to
install gedit
Chapter 7: Pipes and Filters plugins).
Linking Commands GNU emacs.
Multiple commands
Putting jobs in background
Pipes
Learn Bash
o How to use pipes to connect programs (tutorial links)
o Input redirection in pipes
o Output redirection in pipes Bash shell script
o Why use pipes directory
Filters Top 10 Best Cheat
Chapter 7 Challenges Sheets and
Tutorials for
Chapter 8: Traps Linux / UNIX
Commands
Advanced Bash-
Signals
Scripting Guide
o What is a Process?
Command-line Fu
o How to view Processes
< The best UNIX
o Sending signal to Processes
commands on the
o Terminating Processes
web
o Shell signal values
Another website
The trap statement
with best UNIX /
How to clear trap
Linux commands
Include trap statements in a script
Archive of shell
Use the trap statement to catch signals and handle
script examples
errors
and shell script
What is a Subshell?
related articles
o Compound command
Bash FAQ wiki
o exec command
Bash hackers wiki
Chapter 8 Challenges
Chapter 9: Functions
Writing your first shell function
o Displaying functions
o Removing functions
Defining functions
Writing functions
Calling functions
Pass arguments into a function
o local variable
Returning from a function
Shell functions library
o Source command
Recursive function
Putting functions in background
Chapter 9 Challenges
Chapter 10: Interactive Scripts
Menu driven scripts
o Getting information about your system
Bash display dialog boxes
o dialog customization with configuration file
o A yes/no dialog box
o An input dialog box
o A password box
o A menu box
o A progress bar (gauge box)
o The file selection box
o The form dialog for input
Console management
o Get the name of the current terminal
o Fixing the display with reset
o Get screen width and hight with tput
o Moving the cursor with tput
o Display centered text in the screen in reverse
video
o Set the keyboard leds
Turn on or off NumLock leds
Turn on or off CapsLock leds
Turn on or off ScrollLock leds
o Set terminal attributes
Display KDE / GTK+ GUI dialog
o zenity: Shell Scripting with Gnome
Shell script create a calendar GUI
dialog box
Shell script create a file selection GUI
dialog box
Shell script to send notification to the
Gnome notification area
Shell script create a list GUI dialog
box
Shell script create an error message
GUI dialog box
Shell script create an information
message GUI dialog box
Shell script create a question message
GUI dialog box
Shell script create a warning message
GUI dialog box
o kdialog: Shell scripting with KDE
notify-send: Send desktop notifications
Chapter 10 Challenges
To do
Work in progress
Navigation menu
Log in
Main Page
Discussion
Read
View source
View history
Search
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Printable version
Permanent link
Page information
This page was last edited on 17 April 2023, at 18:37.
Content is available under Attribution-Noncommercial-Share Alike 3.0 Unported
unless otherwise noted.
Privacy policy
About Linux Bash Shell Scripting Tutorial Wiki
Disclaimers
Mobile view