Question: write a bash script that has at least two arguments on the command line. The first argument is the pathname of a file containing a
write a bash script that has at least two arguments on the command line. The first argument is the pathname of a file containing a valid DNA string with no newline characters or white space characters of any kind within it. (It will be terminated with a newline character.) File contains nothing but a sequence of the letters a, c, g, and t. The remaining arguments are strings containing only the bases a, c, g, and t in any order. For each valid argument string, it will search DNA string in the file and count how many non-overlapping occurrences of that argument string are in the DNA string. To make sure you understand what non-overlapping means, the string ata occurs just once in the string atata, not twice, because the two occurrences overlap. If your script is called correctly, it will output for each argument a line containing the argument string followed by how many times it occurs in the string. If it nds no occurrences, it should output 0 as a count.
Step by Step Solution
There are 3 Steps involved in it
To solve this problem we need to write a Bash script that reads a DNA sequence from a file and counts the number of nonoverlapping occurrences of spec... View full answer
Get step-by-step solutions from verified subject matter experts
