Reverse
Previous  Top  Next

Reverse is quite possibly the simplest of the command words. It takes two parameters which are the filenames to use. The command simply reads in each of the lines in the first file and creates a second file with the lines in reverse order (i.e., the last line in the first file is the first line in the second file). It is useful for those files where the data is provided with the most recent data first. The matching engine ultimately needs the data to be chronologically ordered from earliest at the top of the file to the most recent at the bottom.

The following example simply takes a file named "reordered.txt" and flips the lines in it from top to bottom in a file named "reversed.txt".

reverse|reordered.txt|reversed.text