Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
各位前辈:想请教一下,在不知道最后一步是多少的情况下,怎样使用命令cp -r 复制最后一步的结果并重命名。比如:使用simpleFoam算气体,直到收敛,但不知道何时收敛的情况下,怎样复制收敛时刻(-latestTime)的结果并重命名。感谢!
cp -r `foamListTimes -latestTime` newName
@李东岳 感谢老师的回复。foamListtimes -help 里好像没有cp的选项,但在Allrun里加上两行
{latestTime="$(foamListTimes -latestTime)" cp -r "${latestTime}" newTime}
可以正常运行了。