Append to files

I have a directory full of files. My goal is to append text to the beginning of the file. The text that goes at the beginning is the same for each file. This is my attempt #!/bin/bash …

Sort words in file

I’ve got some problems I’m not capable of overcoming. I need to count the first let’s say N words in a text file. Then, I have to print them in decreasing order, followed by the number of occurrences….