/bin/bash: command not found error

34 Ansichten (letzte 30 Tage)
Ana
Ana am 21 Dez. 2022
Beantwortet: MJFcoNaN am 21 Dez. 2022
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.

Antworten (1)

MJFcoNaN
MJFcoNaN am 21 Dez. 2022

Kategorien

Mehr zu Programming finden Sie in Help Center und File Exchange

Tags

Produkte


Version

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by