Scripting Task 3. Write a script called Task3.sh that includes two functions. The first function takes a single parameter: a filename. If a file with this name exists, the script should print out an...


PLEASE SOLVE USING LINUX BASH SCRIPT


Scripting Task<br>3.<br>Write a script called Task3.sh that includes two functions.<br>The first function takes a single parameter: a filename. If a file with this name exists, the<br>script should print out an error message and exit with a suitable status code.<br>The second function takes two parameters: a filename and a number N. This function<br>should use a suitable loop to write N random integers to the named file.<br>Your script should call the first function with a filename, and then call the second function<br>with the same filename and a number. You may

Extracted text: Scripting Task 3. Write a script called Task3.sh that includes two functions. The first function takes a single parameter: a filename. If a file with this name exists, the script should print out an error message and exit with a suitable status code. The second function takes two parameters: a filename and a number N. This function should use a suitable loop to write N random integers to the named file. Your script should call the first function with a filename, and then call the second function with the same filename and a number. You may "hard code" the function parameters into the script; you do not need to read these in from the command line. For example, your script may include statements a little like this: function1 data.txt function2 data.txt 12

Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here