I have a directory named "test" containing data files saved during a simulation at different times. The names of the files are like 2.01149, 2.1149, 2.35698, 2.545, 2.95874566..... and many more etc.
I want to have the time files with only 4 digits after the decimal point or I would like to have the file names rounded-off to a nearest integer such as 2.0115, 2.1149, 2.3670, 2.5450, 2.9588... etc. Can anyone help me how to do this?
I am new to ubuntu. May I request anyone to explain how to execute on command line, a bit clearly like where to keep directory name, etc. Thanks for understanding!!!
Query after obtaining the solution to the above
Hi, the command prename -n 's/\d\.\d+/sprintf "%.4f", $&/e' *([0-9.])
helped rename my time files.
But, I am facing an error while trying to open paraview.
The terminal says: FOAM Warning :
From function void Foam::Time::setControls()
in file db/Time/Time.C at line 307
Reading "/Re600/2.498/uniform/time" from line 15 to line 23
Time read from time dictionary 2.497956694 differs from actual time 2.498.
This may cause unexpected database behaviour. If you are not interested in preserving time state delete the time dictionary.
After opening the paraview, some field values like vorticity, Lambda2 are not displayed.
How to rectify this?