【发布时间】:2011-01-03 22:48:33
【问题描述】:
我想在 MATLAB 中调用以下 bash 命令:
grep "Up to" ~/test_linux/vision1.1/log | awk '{print $7}'
我在 MATLAB 中使用system(),结果发现有错误:
>> [status string]=system('grep "Up to" ~/test_linux/vision1.1/log | awk '{print $7}' ');
??? [status string]=system('grep "Up to" ~/test_linux/vision1.1/log | awk '{print $7}' ');
Error: Unbalanced or unexpected parenthesis or bracket.
我是否需要将 bash 命令中的一些特殊字符转义为 MATLAB 中的字符串?
【问题讨论】:
标签: bash matlab string system escaping