mirror of
https://github.com/techarkit/shell-scripting-tutorial.git
synced 2026-01-14 03:01:42 +00:00
112 lines
3.0 KiB
Markdown
112 lines
3.0 KiB
Markdown
# shell-scripting-tutorial
|
|
|
|
A complete begineers guide to learn shell scripting from scratch which includes Videos, Practice scenarios and project idea. I will create one file for one topic with code.
|
|
|
|
Before jumping into the Shell scripting below are commands you have to practice for better understanding and familiar with Linux command line interface.
|
|
|
|
If you do not learn below commands also fine but i personally recommend you to learn commands first.
|
|
|
|
[103 Linux Commands Video Tutorial](https://www.youtube.com/watch?v=VG-MMju9RhQ&list=PLHyfPDPl-JDX_dfDEpsvglu4x3h1RjPkz)
|
|
|
|
alias and unalias, arch, arp-Done, at-Done, awk-Done, bc-Done, blkid, cal-Done, cat-Done, cd-Done, chage-Done, chattr-Done, chgrp-Done, chmod-Done, chown-Done, cp-Done, cpio-Done, crontab-Done, curl-Done, cut-Done, date-Done, dd-Done, df-Done, diff-Done, dig-Done, dnf, du-Done, expr-Done, fdisk, file, find, firewall-cmd, free, ftp, grep, head, history, hostname, id, ifconfig, iostat, ip, kill, last, lessandmore, ln, locate, lpstatandlpadmin, ls, lsof, lspci, mail, man, mdadm, mkdirandrmdir, mkisofs, mount, mutt, mv, nano, netstat, nice, renice, nslookup, passwd, pam_tally2, paste, ping, perloneliner, pkill, ps, pwd, reboot, poweroff, rm, rpm, rsync, scp, screen, sed, sort, ss, ssh, sysctl, tail, tar, tcpdump, top, touch, tr, traceroute, umask, uname, uniq, uptime, useradd, vi, vmstat, w, who, watch, wc, wget, ypcat, yppasswd, yum, zip, sar
|
|
|
|
After that start learning shell scripting using below topics
|
|
|
|
[Shell Scripting Video Tutorial](https://www.youtube.com/watch?v=7GNUzvjS_mE&list=PL8cE5Nxf6M6b8qW7CSMsdKbEsPdG9pWfu)
|
|
|
|
Difference between scripting and programming
|
|
|
|
What is shell scripting and it's advantages
|
|
|
|
PATH environment variable
|
|
|
|
What is sub-shell
|
|
|
|
Quotes single, double and reverse - Know difference between each
|
|
|
|
Grab User input and Print - Using read command
|
|
|
|
Bash colors
|
|
|
|
Script exit status
|
|
|
|
Variables and it's rules
|
|
|
|
Environment Variables, system variables and user defined variables
|
|
|
|
Constant variables, Local & Global variables and Special variables
|
|
|
|
Positional Parameters
|
|
|
|
Count number command line arguments $#
|
|
|
|
Arithmetic Operators
|
|
|
|
Relational Operators
|
|
|
|
Relational ASCII operators
|
|
|
|
Logical Operators
|
|
|
|
Assignment Operators
|
|
|
|
Boolean Operators
|
|
|
|
Redirecting Input, output and errors
|
|
|
|
Maths using expr command
|
|
|
|
Real maths using bc command
|
|
|
|
Do mathametics using let command
|
|
|
|
Escape sequence
|
|
|
|
if statement
|
|
|
|
if statement with test command
|
|
|
|
if-else statement
|
|
|
|
if-else-if statement
|
|
|
|
Nested if statement
|
|
|
|
Case statement
|
|
|
|
For Loop
|
|
|
|
While Loop
|
|
|
|
Until Loop
|
|
|
|
Break, sleep, continue and Exit
|
|
|
|
Functions
|
|
|
|
Arrays
|
|
|
|
Eval command
|
|
|
|
Shifting parameters using shift command
|
|
|
|
Tput making menu's
|
|
|
|
Executing Multiple scripts from single script
|
|
|
|
$(()) - Pass command to sub-shell
|
|
|
|
logger logging messages to log file
|
|
|
|
IFS - Input Field Separator
|
|
|
|
Exec to send input to terminal
|
|
|
|
Writing CPU Usage script
|
|
|
|
Writing Disk Utilization script
|
|
|
|
Trouble shooting debugging shell scripts
|
|
|
|
Checking shell script errors and improvements using shellcheck.net site
|