필터 지우기
필터 지우기

Meaning of a code line

조회 수: 4 (최근 30일)
Ricardo Duarte
Ricardo Duarte 2021년 12월 6일
댓글: Ricardo Duarte 2021년 12월 6일
Dear all,
I have an old piece of code that I'm trying to understand.
The line that is confusing me is:
eval( [ '!copy ' filename '.env + ..\HST_K_tail.env > foo.prt|' ] );
I understand the "eval" function but I don't understand the "+" signal and the following text.
Is anybody here that can translante it for me please.
Thank you all in advance.

채택된 답변

Walter Roberson
Walter Roberson 2021년 12월 6일
편집: Walter Roberson 2021년 12월 6일
! is going to invoke an operating system command. The operating system copy command will be invoked.
We can tell by the ..\ that the target is MS Windows. So this is the DOS copy command.
https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/copy
The DOS copy command allows you to specify multiple source files separated by + and all of those are to be combined in order.
In short, the command is adding a footer on to the end of the original file and storing the result into a particular file. I am not on the significance of the final | as I do not use Windows shell much.
  댓글 수: 1
Ricardo Duarte
Ricardo Duarte 2021년 12월 6일
Thank you Walter!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by