clarification on dos command

6 ビュー (過去 30 日間)
Faris
Faris 2011 年 3 月 7 日
given the statements
if (exist([current_folder, '/', file_name], 'file') && exist([current_folder, '/', strip_comments_exe], 'file'))
cmd=['"', [current_folder, '/', strip_comments_exe], '" ', strip_comments_options, ' ', [current_folder, '/', file_name], ' ', strip_comments_output_option, ' ', num2str(i), 'a.h'];
where the variables represent the following:
  1. current_folder = pwd,
  2. strip_comments_exe = relative path to a .exe file
  3. strip_comments_options = '' (empty string not double quotes)
  4. strip_comments_output_option = '>'
  5. file_name= relative path to a C header file
what is the function below supposed to achieve?
dos(cmd,'-echo')

採用された回答

Walter Roberson
Walter Roberson 2011 年 3 月 7 日
It will run the strip-comments executable, reading in the C header file, and output the results to a file whose name starts with the number "i" followed by a literal "a" and an ".h" extension.
For example, it might read in MyHFile.h and output 147a.h if "i" had the value 147 .
The -echo option will show the command before it is executed, but that will be written into the output file.
  7 件のコメント
Walter Roberson
Walter Roberson 2011 年 3 月 8 日
libintl3.dll is a FSF (Free Software Foundation -- GNU) library for internationalization. Your utilities have either not been built properly or have not been installed properly. See for example the discussion <http://forums.devside.net/index.php?topic=335.0 here>
Faris
Faris 2011 年 3 月 8 日
Gotcha! The program indent.exe was a package I downloaded but it seems I forgot to download the dependencies file for it. After downloading and putting the dll's in the System32 folder I can now see the *a.fmt files in temp_folder!!! Thanks~!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDownloads についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by