Skip to main content

Command Palette

Search for a command to run...

Exploring the linux Shell Scripting !!! blog 7

Published
•2 min read•View as Markdown

Hey, hi, and hello! As you know, I am Suyash Gawde. Today, I attended the seventh day of the Linux workshop at DBATU, Lonere, conducted by Pranav Jambare , as mentioned in my previous blog.

In today's session, the following topics were covered:

Filtration

Shell Scripting

Filtration

Filtration: In the "Sort" section, the second example should be: sort -n LinuxFile instead of sort -n LinuxFile1. In the "Tail" section, the first example should be: tail -n 5 LinuxFile instead of tail -5 LinuxFile. In the "Head" section, the first example should be: head -5 LinuxFile instead of head -n 5 LinuxFile. In the "Grep" section, the fourth example should be: grep -A <number of lines> <"word to be searched"> LinuxFile instead of grep <"word to be searched"> -A LinuxFile.

.

Shell Scripting

Shell Scripting: In the "Shebang" section, the sentence "Shebang is simply an absolute path to the bash interpreter." should be revised to "Shebang is simply a combination of the hash symbol # and the exclamation mark ! followed by the bash shell path."

How shell scripting works: In the "Creating the script" section, the line "chmod 755 hello_world" should be corrected to "chmod 755 hello_world.sh". In the "Run the script" section, the line "$ hello_world" should be corrected to "$ ./hello_world.sh".

Numeric Comparison logical operators: In the table, the "Greater than equal to" row, the operator should be "num1 -ge num2" instead of "num1 -gt num2".

Conditional Statements (Decision Making): In the "Else-if Ladder" section, the condition in the third elif statement should be: elif [ ${age} -gt 100 ] instead of elif [ ${age} -ge 100 ].

I hope you find this blog interesting!

Thanks for reading!