/bin/bash: command not found error

30 visualizaciones (últimos 30 días)
Ana
Ana el 21 de Dic. de 2022
Respondida: MJFcoNaN el 21 de Dic. de 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.

Respuestas (1)

MJFcoNaN
MJFcoNaN el 21 de Dic. de 2022

Categorías

Más información sobre Programming en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by