Complete Course on Linux Bash Shell Scripting with Real-Life Examples [Video]
show avaible shells
cat /etc/shells
lists long file in reverse order
-l == list long version
-t = sort by most used to least
-r = reverse
ls -ltr
Script Naming Convention
- Scripts directory
- Script name should id function
- Script should end with .shell (if multiple shells are used.)
Script File Permissions
All script to be executed should have proper executable file permissions
to change permissions
chmod a+x scriptname
Script Format
Define shell (#!/bin/bash)
Comments (# comments)
Define Variables (ex: name=Iran)
Commands (echo, cp , grep)
Statements (if, while, for )