Extract part of the text file
古いコメントを表示
Sorry if duplicated post.. but i don't know where I should put the question....
There is the situation... I am using ABAQUS to simulate some tests, and i have to edit the input file (normal text file) to incorporate switches that are not available in the GUI version of ABAQUS.
Two Question
Question 1:-
Is it possible to: search for two keywords, then select the lines between them and delete it?
the sample input file is as follow:
**
** STEP: Eigen
**
(SOME MORE LINES)
** FIELD OUTPUT: F-Output-1
**
*Output, field, variable=PRESELECT
*End Step
** ----------------------------------------------------------------
**
** STEP: Ax Load
**
the first keyword will be STEP: Eigen, and the second one is STEP: Ax Load. What i hope matlab can do is: search for STEP: Eigen, remember the line number search for STEP: Ax Load, remember the line number delete all the lines in between the two saved lines.
Question 2:- At the end of the input file, I need to add two lines below the keyword. The sample input file is as follow:
*Output, field, variable=PRESELECT
**
** HISTORY OUTPUT: H-Output-1
**
*Output, history, variable=PRESELECT
*End Step
The keywords will be: *Output, history, variable=PRESELECT and i want to add two lines, something like: *node file, global=yes U
I will be very thank to the person that can help me on this....
Thank You!!!
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Text Files についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!