Hi could you please recommend me a site with a good tutorial on how to use foreach in linux. I\'m trying to make it to get the every element inside one file, where each element is separated by whitespace and put it together with another file which is the 2nd element of 5 elements which are separated by commas.
Okay, here\'s my other problem. I\'m trying to get the number of times set of strings have appeared on a text file. For example, if the words were scissors and paper. then the output would be
30 scissors
5 paper
I could do
30
5
but I can\'t quite insert the text on the file, since printf and echo don\'t work well with pipelining. btw, is it possible to do it in one line, without using semicolons, given that the strings to be tested are given?