bash,scripting

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!

  1. The problem statement, all variables and given/known data:

i have to do this but i am confused,

Create a file containing the bash functions which perform the following tasks. Clearly label each function. Print out and turn in this file.

1.Write a function which displays the current date, time, username, and current directory.

2.Write a function which displays all of its parameters (no matter how many).

3.Write a function called reverse which will display the reverse of an integer. The function will take exactly 1 argument and display the result. That is, typing
reverse 12345
results in the output
12345 reversed is 54321

4.Write a function called comp which performs integer arithmetic (addition, subtraction, multiplication, division, and modulus). The function will take exactly 3 arguments - two operands and an operation - and display the results. That is, typing
comp 5 + 3
results in the output
5 + 3 = 8
Your function should verify that there are exactly 3 parameters.

5.Write a function called summer which will add up a list of integers (length unknown). That is, typing
summer 1 2 3 4 5
results in the output
15

  1. Relevant commands, code, scripts, algorithms:

Hint: First write the function to add two integers. Then create a recursive function which shifts the parameters, adding the new first parameter to the sum.

  1. The attempts at a solution (include all code and scripts):

  2. Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):
    UT Panamerican, EDINBURG,TX,USA, Egle, 2344

Note: Without school/professor/course information, you will be banned if you post here! You must complete the entire template (not just parts of it).

Please review the guidelines on posting homework.