-
Write a bash script to emulate a calculator. The script should have 4 functions
Add - to add 2 numbers
Sub - to subtract 2 numbers
Multi - to multiply 2 numbers
Div - to divide 2 numbers - (throw error when divided by zero)
Check if the number arguments are passed is correct or not ($# will give you no of arguments) Use case statements to invoke corresponding functions
-
Write a bash script for converting the files under a directory from lower case to upper case. Script should have the following functions.
Ls_files - List all files under the directory (use find)
Up_content - function to convert the contents of the file to uppercase (use sed -i or tr)
If the directory does not have any files, proper msg should be given to the user.