I recently ran a simulation that output temporal data in directories numbered 0, 0.1, 0.2, ... , 10.
Within each of these directories there is a text file called rigidMotion which contains a line I want to read.
The line looks like:
centreOfRotation (0.000 0.000 0.000) //
where the numbers vary of course.
I would then like only the numbers to be sent to a text file or a csv file so I can plot them.
Given that its the same line in each file I was trying to use linecache but I'm not sure how to set up the for loop to read each directory.
^centreOfRotation (.+)in multiline mode and grab the first group. Or, read the text line-wise and usestartswith().