/bin/bash: command not found error

27 次查看(过去 30 天)
Ana
Ana 2022-12-21
回答: MJFcoNaN 2022-12-21
I have problems in a matlab script that executes a command from the bash terminal. This is the line in the script that gives error:
!tif2mrc irudiak_final.tif irudiak_final.ali
where irudiak_final.tif and irudiak_final.ali are two files, and the command is mrc2tif.
This is the error message that appears in the console:
>> !mrc2tif
/bin/bash: line 1: mrc2tif: command not found
However, when I run the same command from the bash terminal itself or when running the basic bash commands from the matlab script (mv, cp, etc) they run without errors. The error appears when calling a program whose path I have previously added to the $PATH variable in bash.
Moreover, this problem occurred when I tried to run the matlab script on CentOS Stream 9, as the same script does not give me any problem on another CentOS 7.9 machine.
I have found an issue that refers the same problem (https://es.mathworks.com/matlabcentral/answers/316062-bin-bash-stp-command-not-found) but I can't apply the accepted solution, as the matlab script they propose to modify is read-only.

回答(1 个)

MJFcoNaN
MJFcoNaN 2022-12-21

类别

Help CenterFile Exchange 中查找有关 Programming 的更多信息

标签

产品


版本

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by