Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 1

PTU LEARNING CENTRE: BRAINWARE Course: BCA Software Lab VI (OS Lab)

Semester: 4 Time: 1.5 Hours Instructions to the Students: Attempt any 5 questions. Show the output to the Invigilator. Q1) Q2) Q3) Q4) Q5) Q6) Q7) Write a shell script to add two numbers. Create the following directory structure using a single command Dir1/Dir2/Dir3. Now forcefully delete the same using a single command. Create a file in Linux using cat command. Make a hard link and a soft link of it. View it using ls command. How to calculate 5.12 + 2.5 real/fractional number calculation at $ prompt in Shell? Write a script for it. Write a shell script that will print the current date, current time and current user directory. Write a shell script that accepts filenames and converts its contents to uppercase characters. Execute the following commands: a) Display the System Date only in the form of dd/mm/yyyy. b) Display all the files and directories in your current directory those are created or modified in the month of January. Class Test II Full Marks: 25 5x5=25

#!/bin/Bash echo "Enter the two numbers to be added:" read n1 read n2 answer=$(($n1+$n2)) fi echo $answer Read more: http://wiki.answers.com/Q/Shell_script_to_add_two_numbers#ixzz1SRPGU4p0

You might also like