Instructions part 1 Your assessment is to write a script that will assist you as a Linux administrator. Your script must include a discipline you have learned during this class (mail, user accounts,...

1 answer below »


Instructions part 1


Your assessment is to write a script that will assist you as a Linux administrator. Your script must include a discipline you have learned during this class (mail, user accounts, etc.). You can reuse some code, as that is common practice; however, you must include code to make it original to you.



Requirements


The script can reuse some code. However, the majority of the code must be original. You must use comments (#) to explain the different parts of the code so the reviewer can follow along. The script must be a BASH script. Your assessment must include the page(s) of code, as well as a screen capture of the script performing the action as intended.Be sure to include both in-text citations and references for all sources.





Answered Same DayJul 24, 2022

Answer To: Instructions part 1 Your assessment is to write a script that will assist you as a Linux...

Aditi answered on Jul 24 2022
82 Votes
Solution
#!/bin/bash
# Recursive factorial function
factorial()
{
product=$1

# Defining a function to calculate factorial using recursion
if((product <= 2)); then
echo $product
else
f=$((product -1))

# Recursive call
f=$(factorial $f)
f=$((f*product))
echo $f
fi
}
# main program
# reading the input from user
echo "Enter the number:" ...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here