![]() As an alternative, you can therefore add the above variable assignment to a brand new file and then start bash with bash -i -rcfile envfile -c bet To the ~/.bashrc file, but be aware that the purpose of this file is to set up the shell for interactive work, which may include running commands you don't want to run every time you start bet. Another option would therefore be to add PATH=$PATH:/usr/local/fsl/bin This would make the shell an interactive shell, and it would parse the ~/.bashrc file. In the question, you also include the -i option when you start the bash -c command. This would take effect with the next login shell session. This would be done by adding the following to one's shell's startup files (typically ~/.bash_profile for the bash shell): PATH=$PATH:/usr/local/fsl/bin This could be done in either of these ways: PATH=$PATH:/usr/local/fsl/bin bash -c betĮnv PATH="$PATH:/usr/local/fsl/bin" bash -c betĪppend the appropriate directory path to the PATH environment variable by modifying the current shell's environment. Use the exact pathname of the executable: bash -c '/usr/local/fsl/bin/bet'Ĭhange the PATH variable's value inside the bash -c script, before calling bet: bash -c 'PATH=$PATH:/usr/local/fsl/bin bet'Īppend the appropriate directory path to the PATH environment variable when you start the bash -c command. The issue seems to be that the path to the bet executable is not in the search path for the non-interactive shell you are starting. ![]() ![]() If this is a question regarding the use of cmd.exe, then the question may find a more appropriate audience on the SuperUser site. WSL is, in most user-visible ways, a Unix environment. The command does go through if I run bet from linux shell directly).įYI: Bet is a brain extraction tool which comes with FSL ( )Īs I know nothing about Windows and its cmd.exe, this answer assumes a Unix environment. (The bet command receives additional parameters which I add to the end, but the command does not go through. I have also tried doing this with wsl -e "bet" however that also does not achieve what I'm trying to do. ![]() When I try doing this by opening cmd.exe and typing bash, and then typing "bet" to the linux command line, it works fine. Which throws an error: Command 'bet' not found, did you mean:Ĭommand 'bget' from deb ax25-tools (0.0.10-rc4-3build1)Ĭommand 'bst' from deb buildstream (1.4.1-1)Ĭommand 'btt' from deb blktrace (1.2.0-5)Ĭommand 'bat' from deb bacula-console-qt (9.4.2-2ubuntu5)Ĭommand 'ben' from deb ben (0.9.0ubuntu2)Ĭommand 'fet' from deb fet (5.42.2-2build1)Ĭommand 'eet' from deb libeet-bin (1.23.3-8)Ĭommand 'net' from deb samba-common-bin (2:4.13.17~dfsg-0ubuntu1.20.04.1) I have WSL installed, and I am trying to run a command called "bet" from cmd.exe by I am facing the same issue here: Passing command to bash from cmd.exe (WSL) not workingĮxcept that for me the solutions there do not work either. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |