When run in the molecules directory, which ls command(s) will produce this output?
ethane.pdb methane.pdb
echo hello > testfile01.txt
echo hello >> testfile02.txt
In our current directory, how would we find the 3 files which have the least number of lines?
cat animals.txt | head -n 5 | tail -n 3 | sort -r > final.txt
goostats <input_filename> <output_filename>
You and your friend, having just finished reading Little Women by Louisa May Alcott, are in an argument. Of the four sisters in the book, Jo, Meg, Beth, and Amy, your friend thinks that Jo was the most mentioned. You, however, are certain it was Amy. Luckily, you have a file LittleWomen.txt containing the full text of the novel (data-shell/writing/data/LittleWomen.txt). Using a for loop, how would you tabulate the number of times each of the four sisters is mentioned?
Hint: one solution might employ the commands grep and wc and a |, while another might utilize grepoptions. There is often more than one way to solve a programming task, so a particular solution is usually chosen based on a combination of yielding the correct result, elegance, readability, and speed.