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

Question no 01: [4 Marks]

Write a Bash Function which returns Factorial of an integer passed as an argument to the
script. Returned value must be captured and printed.
ANSWER:

Question no 02: [4 Marks]


Write a bash script to take two integers as arguments and apply all arithmetic operations on
them and then print the output on a file named “OUTPUT”.
NOTE: Every time you run the script the previous output must NOT be lost.

ANSWER:
Question no 03: [5 Marks]
You have to create Bash Function named BookInfo in the script which will take data from
HereDocument text. Six variables are declared in the function which will take data from user.

-ISBN,
-bookName,
-authorName,
-edition,
-publication
-price

Print all these variables output on a file name “ MyBooks”


NOTE: Every time you run the script the previous output must NOT be lost

ANSWER:

You might also like