Meaning of a code line

2 ビュー (過去 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 Center および File ExchangeWhos についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by