os lab 3.docx - Bahria University Lahore Campus Department of Computer Sciences Lab Journal 03 Course Course Code Faculty\u2019s Name Operating System Lab

os lab 3.docx - Bahria University Lahore Campus Department...

This preview shows page 1 - 9 out of 21 pages.

Bahria University, Lahore Campus Department of Computer Sciences Lab Journal 03 Course: Operating System Lab Date:26/2/2020 Course Code: CSL - 320 Max Marks: 20 Faculty’s Name: Sir Zia Lab Engineer: Sarah Chaudhry Name: Muhammad Saad Enroll No: 03-135182-012 Objective(s) : To understand LINUX shell programming variables, wildcards, expressions and control structures. Lab Tasks : Task 1: Write the output of programs for LINUX variables.
Image of page 1
Task 2: Write a program to calculate the addition, subtraction, multiplication and division of numbers.
Image of page 2
Task 3.1: Write a program that compares two numbers if a is greater than b it displays “a is greater than b”, otherwise it displays that ‘a is not equal to b’.
Image of page 3
Task 3.2: Write a program that compares two numbers check whether the numbers are equal, a is greater than b or a is less than b.
Image of page 4
Task 4 : Write a program using “case” that inputs a fruit from the user and displays “Apple pie” on the input of apple, “I like banana” on the input of banana and “New Zealand famous for kiwi” on the input of kiwi.
Image of page 5
Image of page 6
Lab Grading Sheet : Task Max Marks Obtained Marks Comments( if any ) 1. 5 2. 5 3. 5 4. 5 Total 20 Signature Note : Attempt all tasks and get them checked by your Lab. Instructor Lab 03: LINUX Shell Programming - I Objective(s): To understand LINUX shell programming variables, wildcards, expressions and control structures. Tool(s) used: Ubuntu, VIM Editor
Image of page 7
Introduction Shell programming is a group of commands grouped together under single filename. After logging onto the system a prompt for input appears which is generated by a Command String Interpreter program called the shell. The shell interprets the input, takes appropriate action, and finally prompts for more input. The shell can be used either interactively - enter commands at the command prompt, or as an interpreter to execute a shell script. Shell scripts are dynamically interpreted, NOT compiled. Common Shells C-Shell - csh The default on teaching systems Good for interactive systems Inferior programmable features. Bourne Shell bash or sh - also restricted shell – bsh (The Bourne Again Shell) It was written by Steve Bourne. Over the years the original Bourne Shell has been expanded, but it remains the basic shell provided in many commercial versions of Linux.
Image of page 8
Image of page 9

You've reached the end of your free preview.

Want to read all 21 pages?

  • Spring '20
  • Test, Shell script, C shell, General Shell Terminologies

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes