Also there are some programming language such as Python, Perl and Ruby could help to take the job of Linux system programming but you still need to know something about Bash.
OK Let’s kick start!
Print the environment variable
You can use echo and printf to display some environment variable on the screen.
Calculation
In Bash shell, let, (()) and [] can be used for basic calculation.
Stdin
> and >> are for file input.
Date format
In Unix-like system, date is stored as a number which record the count of seconds from Jan-1 1970 UTC
Function and param
Like other script language, Bash also support function.
Pipes
Pipes let you use the output of a program as the input of another one.
Cat command
cat command is used for contact the display content.
cat won’t modified your file content, just create a new one in stdin.
Translate
tr used for replace and delete character from stdin.
Checksum
MD5
File rename and moving
Here’s an example for rename all the mp3 file in current directory.
The output will be like beflow
Word Count
Print the directory tree
Download the website
wget is used for file download. If you are using the Mac OS, you need to download the command first.
curl is same with the wget command, but it will create the stdin stream as input.