필터 지우기
필터 지우기

/bin/bash: stp: command not found

조회 수: 8 (최근 30일)
Aaron Anderson
Aaron Anderson 2016년 12월 8일
댓글: Dedong Wang 2017년 5월 16일
I'm having sort of a strange issue with MATLAB suddenly not finding files in my bash's path. From a normal bash terminal, I can type "stp" and it opens a program, because it's within bash's $PATH variable. But now suddenly, MATLAB no longer finds the command (it worked before). I even tried making sure it is in MATLAB's "path" (when I type path the folder it resides in is there), so I'm not really sure which side I should be hitting this issue from.
It used to be from the MATLAB terminal I could type "stp" and it would run the program like if I typed that at terminal, but now it seems to have trouble recognizing it. Any ideas how this might have changed? My code runs the command through like so, which allows for it to tell STP to do some specific commands that I outline in tfile before calling it.
scmd = sprintf('stp < ''%s''', tfile);
[status, cmdoutput] = system(scmd)
So suddenly this doesn't work anymore.
  댓글 수: 1
Aaron Anderson
Aaron Anderson 2016년 12월 8일
편집: Aaron Anderson 2016년 12월 8일
It appears that when I type !echo $PATH, it isn't loading the .bashrc file (which adds stp to bash's $PATH). I guess I sort of had assumed it would do that because it uses the bash terminal. So this is probably why it's doing this. Although I never had to do this before, which is somewhat strange.

댓글을 달려면 로그인하십시오.

채택된 답변

Aaron Anderson
Aaron Anderson 2016년 12월 8일
I found the answer in an old newsgroup post. What I did was go to my MATLAB directory and under
/MATLAB/R2016b/bin/
I found a file called "matlab" to which I added a line at the top
export PATH=$PATH:desired/path/to/program
This appears to have fixed the issue.
  댓글 수: 1
Dedong Wang
Dedong Wang 2017년 5월 16일
But I find it is a read only file and I cannot add that line at the top of that file.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 File Operations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by