I need to write a bash script that does the following:
If it is given fewer than two arguments, it prints an appropriate
error and exits. Append to the file indicated by the first argument
the following information:
- The time and date
- One line for each of the second-through-last arguments, containing the number of lines in the file and then the name of the file
- The total number of files in the list.
The following code should do what you are asking for. Let me know if you have any problems with it.