Starting from:

$29.99

CSE321 Assignment 1 Solution



1 Write down shell commands to do the following:
• Delete all the files and folders from a directory
• Show the files in a directory
• Find all the .txt files in a folder
• Check for the given string in multiple files
• Write a command to give only read and execution permission of a file to owner, group and user
5
2 Write a shell script to find the Fibonacci series up to given number. Sample input: 20
Sample output: 1 1 2 3 5 8 13
5
3 Write a shell script to make a simple calculator that can carry on four operations: addition (+), subtraction (-), multiplication (*) and division (/). Each of these operations will be implemented in separate methods. Prompt the user for the type of operation they wish to do and then the operands.
Sample input: Which operation would you like to do?
+
Operand 1: 2
Operand 2: 2
Sample output: The result is 4 5
4 Write a script that takes a number and finds the sum of all the digits constituting the number.
Sample input: 235
Sample output: 10
5

More products