1. Write a script called grepsort that takes three argument as follows: $ grepsort argl arg2 arg3 "argl", "arg2", and "arg3" are passed as arguments to the script. Example of the usage is S grepsort hello infile outfile This command will print the entries (lines) in file infile that contain the string hello and will append the output sorted to file outfile. Notice that the output is appended to arg3. Check for all possible errors (e.g. number of arguments, existence of the files, permission to read from arg2 and write to arg3, etc.) 2. Write a script called rmszfiles that deletes files containing more than a given number of bytes. As follows: $ rmszfiles sz f1 12 13 --- fn Argument sz is the size (number of bytes) and arguments fl through fn are the file names. The script should behave as follows: If no arguments are given i.e., sz is missing.) the script should write an error message to stderr and exit with a non-zero exit status. If at least the first argument (sz) is present, the script should process each of the file arguments f1 through fn in turn. For each file argument, If the file does not exist or is not a regular file, then ignore that argument and continue processing with the next file argument. Do not print any messages. If the file does exist and is a regular file (i.e., not a directory or some other kind of special file), then if it contains more than sz bytes it should be deleted. If there are no file arguments (i.e., only sz is present), the script should terminate without doing anything further. 1. Write a script called grepsort that takes three argument as follows: $ grepsort argl arg2 arg3 "argl", "arg2", and "arg3" are passed as arguments to the script. Example of the usage is S grepsort hello infile outfile This command will print the entries (lines) in file infile that contain the string hello and will append the output sorted to file outfile. Notice that the output is appended to arg3. Check for all possible errors (e.g. number of arguments, existence of the files, permission to read from arg2 and write to arg3, etc.) 2. Write a script called rmszfiles that deletes files containing more than a given number of bytes. As follows: $ rmszfiles sz f1 12 13 --- fn Argument sz is the size (number of bytes) and arguments fl through fn are the file names. The script should behave as follows: If no arguments are given i.e., sz is missing.) the script should write an error message to stderr and exit with a non-zero exit status. If at least the first argument (sz) is present, the script should process each of the file arguments f1 through fn in turn. For each file argument, If the file does not exist or is not a regular file, then ignore that argument and continue processing with the next file argument. Do not print any messages. If the file does exist and is a regular file (i.e., not a directory or some other kind of special file), then if it contains more than sz bytes it should be deleted. If there are no file arguments (i.e., only sz is present), the script should terminate without doing anything further