So I've once again bit a bit silly trying to output a lot of data in as simple a manner as possible from my Repast model. This means I have 500 files, for every run (20) that I now need to analyse.
I've figured out that the easiest method for doing this is to concatenate the files together. These files are intended for me to analyse how agents are moving around the landscape, and if any movement is occurring from south to north, or vice versa.
The easiest method for this seems to be via the terminal on my Mac, and a great, simple and straightforward method is as follows:
Open /Applications/Utilities/Terminal.app
Type 'sort ' (without the quotes, note the trailing space, and do NOT press return)
Drag the file(s) that you want to sort to the terminal window
type '> sorted.txt' (without the quotes)
Press return. Sort will read the files, sort them and put the sorted list into the file called 'sorted.txt' in your home directory.
Easy peasy!
No comments:
Post a Comment