Question: UNIX- BASH Scripting Please help me how to write that script in bash and explain with details. Thank you. 1, (40%) Write a script named
UNIX- BASH Scripting
Please help me how to write that script in bash and explain with details. Thank you.

1, (40%) Write a script named search-dna that will expect on the command line a ingle argument which is the name of a file containing multiple DNA strings, each on a single line with no white space characters of any kind except for the terminating newline character at the end of the line. Each line is just a sequence of the letters a, c, g, and t. This script will print each line in which the 4th 3-letter sequence is repeated twice later in the line at starting positions that are multiples of three apart. For example, the string below, which is broken into groups of three letters for ease or reading acg ttt ggg ccc agc tet ccg ccc tca cac aca ccc cgg ggt sati sies this requirement, since ccc is the 4th three-letter sequence and it reoccurs twice at positions that are multiples of three apart, whereas this one does not: acg ttt ggg ccc agc tct ccg gcc cca cac aca ccc cgg ggt be cause, although ccc occurs twice later in the line, the first reoccurrence is not a multiple of three positions from the first one. Error checking: This script must check that it is given a filename on the command line that can be read and issue a usage statement if there is an error of this type. 1, (40%) Write a script named search-dna that will expect on the command line a ingle argument which is the name of a file containing multiple DNA strings, each on a single line with no white space characters of any kind except for the terminating newline character at the end of the line. Each line is just a sequence of the letters a, c, g, and t. This script will print each line in which the 4th 3-letter sequence is repeated twice later in the line at starting positions that are multiples of three apart. For example, the string below, which is broken into groups of three letters for ease or reading acg ttt ggg ccc agc tet ccg ccc tca cac aca ccc cgg ggt sati sies this requirement, since ccc is the 4th three-letter sequence and it reoccurs twice at positions that are multiples of three apart, whereas this one does not: acg ttt ggg ccc agc tct ccg gcc cca cac aca ccc cgg ggt be cause, although ccc occurs twice later in the line, the first reoccurrence is not a multiple of three positions from the first one. Error checking: This script must check that it is given a filename on the command line that can be read and issue a usage statement if there is an error of this type
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
