Experiment Name: 05 Decision making and loop control in shell script

 


 

Course Title: Operating Systems

                                              Course Code: CSE323

 

Submitted To:

Md Sabab Zulfiker

Lecturer

Department of Computer Science and Engineering

Daffodil International University

 

Submitted By:

Name: Kawshik Ahmed Ornob

ID: ***-**-*****

Section: 59_D

Department of Computer Science and Engineering

 

 

 

 

 

Experiment No: 05

 

Experiment Name: Decision making and loop control in shell script

 

·       Make directory and a file inside the directory to do further operations.

·       Give all permissions to the file to read, write and execute.


·       Use “nano filename” to open the text file.


·       In linux coding we have to use these special signs instead of these:

For (==) use “ –eq ”

For (!=) use “ –ne ”

For (>) use “ –gt ”

For (<) use “ –lt ”

For (>=) use “ –ge ”

For (<=) use “ –le ”

·       here is a if…else method code in linux . for else if we can use “elif” and to finish the if else condition we have to write “fi” at the end.



·    We can also do multiple condition cases using “&&” and “||”

Such as and, or.



 

 

 

·       We can also use if …else to match strings. Just use “==” for -eq




 More is coming soon..!

Post a Comment

"Give your valuable feedback"
"Thank you"