Giter VIP home page Giter VIP logo

Comments (20)

johnvelab avatar johnvelab commented on June 13, 2024

from workbench.

renxili avatar renxili commented on June 13, 2024

Thank you for your reply! I have try the following command, but the terminal still cannot find wb?command:

(base) Renxis-Mac-mini:~ renxili$ cd /Users/renxili/
(base) Renxis-Mac-mini:~ renxili$ echo 'export PATH=$PATH:/Applications/workbench/bin_macosx64'  >>  ~/.bashrc
(base) Renxis-Mac-mini:~ renxili$ echo 'set PATH = ($PATH   /Applications/workbench/bin_linux64)' >> ~/.cshrc
(base) Renxis-Mac-mini:~ renxili$ wb_command
-bash: wb_command: command not found
(base) Renxis-Mac-mini:~ renxili$ 

from workbench.

renxili avatar renxili commented on June 13, 2024

I think GitHub changes my scripts when posting. Let me attach a screen shoot.
Screen Shot 2020-04-13 at 3 24 19 PM

from workbench.

coalsont avatar coalsont commented on June 13, 2024

Github's markdown formatting got applied to your text and ate all the "~" characters, I will fix it with "code" sections.

Adding the lines to your shell startup file doesn't change your active terminal.  You need to open a new terminal window and try the command there.

By the way, the full command is "wb_command -file-information", the "-file-info" bit is from the optional tab completion instructions, which will not work by default on mac (you must use a newer version of bash than Apple provides to have the prerequisites for our tab completion).

from workbench.

coalsont avatar coalsont commented on June 13, 2024

Note that the echo lines append to files that your shell executes when it starts up, and it looks like you may have executed them more than once. You may want to use a text editor to make sure ~/.bashrc and ~/.cshrc don't contain repeated lines.

from workbench.

renxili avatar renxili commented on June 13, 2024

Do you mean deleting the ">>" before the ~/.bashrc and ~/.cshrc?

from workbench.

coalsont avatar coalsont commented on June 13, 2024

No. Do nano -w ~/.bashrc (the -w disables auto line wrapping), use the down arrow key or page down key to get to the bottom of the file, and see if there are multiple lines that say the same thing. Use the arrow keys to put the cursor on one of the duplicate lines, use control-k to delete the line the cursor is on, until there is only one of the line that was duplicated. If you mess up, press control-x to quit, and press n to not save the changes. Once you have fixed it correctly, press control-o to save, press enter to accept saving to the same filename, then press control-x to quit (these commands are shown in the bottom of the editor screen, ^ means control). Do the same for ~/.cshrc.

You could try textedit, but you would need to be very careful to use plain text mode, not introduce any unicode characters, and you might need to disable autocorrect - if the file is saved with problems in it, new terminal windows will complain and may not have the correct PATH and may behave strangely. If you know someone who uses linux or the command line a lot, you might ask them to help you.

from workbench.

renxili avatar renxili commented on June 13, 2024

I have deleted the duplicated file in both ~/.bashrc and ~/.cshrc. I also updated the bash to 5.0 via homebrew. However, when I put wb_command -file-info in a new terminal, it still says wb_command is not found. Any suggestions?

from workbench.

glasserm avatar glasserm commented on June 13, 2024

what is your env

from workbench.

coalsont avatar coalsont commented on June 13, 2024

You mean the duplicate lines in ~/.bashrc and ~/.cshrc, and not deleting files, right?

Do echo $PATH in a new terminal window and tell us what it says. It is possible that bash is only reading .profile or .bash_profile, and that it doesn't source .bashrc - shell startup is always an adventure.

from workbench.

renxili avatar renxili commented on June 13, 2024

This is when I entered echo $PATH:

(base) Renxis-Mac-mini:~ renxili$ echo $PATH
/Library/Frameworks/Python.framework/Versions/3.8/bin:/Users/renxili/opt/anaconda3/bin:/Users/renxili/opt/anaconda3/condabin:/usr/local/fsl/bin:/anaconda3/bin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin
(base) Renxis-Mac-mini:~ renxili$

from workbench.

renxili avatar renxili commented on June 13, 2024

This is when I entered "printenv SHELL"

(base) Renxis-Mac-mini:~ renxili$ printenv SHELL
/bin/bash

from workbench.

renxili avatar renxili commented on June 13, 2024

Yes, I only delete the duplicate lines in ~/.bashrc and ~/.cshrc, and leaving one line for each ~/.bashrc and ~/.cshrc

from workbench.

coalsont avatar coalsont commented on June 13, 2024

Do cat ~/.bashrc, cat ~/.bash_profile and cat ~/.profile and tell us what they say.

from workbench.

renxili avatar renxili commented on June 13, 2024

Screen Shot 2020-04-13 at 4 42 40 PM

from workbench.

johnvelab avatar johnvelab commented on June 13, 2024

from workbench.

coalsont avatar coalsont commented on June 13, 2024

So, it looks like for other software you have been putting the lines in your .bash_profile. You also have a line for MSM in your .bashrc, which probably also doesn't work. I would probably solve this by making the .bash_profile source the .bashrc (like it often does on linux), by doing echo 'if [[ -f ~/.bashrc ]]; then source ~/.bashrc; fi' >> ~/.bash_profile (only once!). John's solution is similar, but uses old sh syntax.

Then, open a new terminal and try wb_command.

Our README.txt in the workbench zip distribution looks like it already says to do echo 'export PATH=$PATH:/Applications/workbench/bin_macosx64' >> ~/.bash_profile, not .bashrc, so you apparently followed instructions for a different OS?

from workbench.

renxili avatar renxili commented on June 13, 2024

I can get wb_command running under bash 5.0 now! Is wb_command only runnable under bash?

from workbench.

coalsont avatar coalsont commented on June 13, 2024

No, wb_command can be run by literally anything that wants to. The only thing specific to bash is the tab completion of wb_command operations, options, and file extension filtering. Other shells may still do naive filename tab completion.

from workbench.

renxili avatar renxili commented on June 13, 2024

Okay, now it works in zsh as well. Thank you all so much for your patience and help! You guys are amazing!

from workbench.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.