Longest file with a given extension
Go to the folder exercise-data/:
Write a shell script called longest.sh that takes the name of a directory and a filename extension as its arguments, and prints out the name of the file with the most lines in that directory with that extension. For example:
bash longest.sh alkanes pdbwould print the name of the .pdb file in alkanes/ that has the most lines.
Feel free to test your script on another directory e.g.
bash longest.sh writing txtlongest.sh existslongest.txt exists: bash longest.sh alkanes pdb > longest.txt