Question: p PLEASE HELP ME HOW TO WRITE THIS BASH SCRIPT. PLESE EXPLAIN WITH DETAILS. .A DNA string is a sequence of the letters a, c,
p

PLEASE HELP ME HOW TO WRITE THIS BASH SCRIPT. PLESE EXPLAIN WITH DETAILS.
.A DNA string is a sequence of the letters a, c, g, and t in any order, whose length is a multiple of 3. For example, aacgtttgtaaccagaactgt is a DNA string of length 21. Each letter is called a base, and a sequence of three conse cutive letters is called a codon. For example, in the preceding string, the codons are aac, gtt, tgt, aac, cag, aac, and tgt. A DNA string can be hundreds of thousands of codons long, even millions of codons long, so it is hard to count them by hand. It would be useful to have a simple utility script that could count the number of occurrences of a specific codon in such a string. For instance, in the example string above, aac occurs three times and tgt occurs twice. For simplicity, we al way s assume that we look for codons at positions that are multiples of three in the file, i.e., starting at positions 0, 3, 6, 9, 12, and so on Write a script named countcodon that is given two arguments on the command line. The first is a lower case three letter codon string such as aaa or cgt. The second is the name of a file containing a DNA string with no newline characters or white space characters of any kind except at the end after the sequence of bases; it is just a sequence of the letters a, c, g, and t. The script will output a single number, which is the numbr of ccurrences of the given codon in the given file. It should output nothing but that number. If it finds no occurrences, it should output 0. For example, if the above string is in a file named dnafile, then it should work like this $ countcodon ttt dnafile $ countcodon aac dnafile $ countcodon ccc dnafile The script should check that it has two arguments and exit with a usage message f it does not. It should make sure that it can open the file for reading and print a usage st atement if it cannot. It does not have to check that the string is actually a codon, but it should check that the file contains nothing but the bases and possible terminating newline cdharacter Hint: You will not be able to solve this problem using grep alone. There are a number of commands that might be useful, such as sort, cut, fold, and uniq. One of these makes it very easy. Find the right one
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
