0

Apologies for this rookie question, but I have no idea what to do or who to ask to try and fix this.

While following a Codecademy course and trying to set up Git, I did something that I can't for the life of me remember, and now Terminal doesn't seem to work as it should. All I remember is that it was part of a Computer Science course, using Python and Bash to some extent. Now, pasting commands sent to me from friends to do things such as file conversion isn't working even after following all of the steps necessary, and when I boot Terminal, I see this error message:

Last login: Thu Apr  4 10:45:59 on ttys001
-bash: export: `/Users/admin/Library/Python/3.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Applications/Xamarin Workbooks.app/Contents/SharedSupport/path-bin': not a valid identifier
-bash: touch: command not found
admins-MacBook-Pro:~ Benedict$ 

Even if I just try to do a say command, I get this:

say "Hi"
-bash: say: command not found
admins-MacBook-Pro:~ Benedict$ say "Hello"
-bash: say: command not found
admins-MacBook-Pro:~ 

However, after following the guide on http://osxdaily.com/2018/05/24/command-not-found-mac-terminal-error-fix/, I can get these simple commands like say and ls to work. This quick fix needs to be repeated though when I close and reopen Terminal.

I have absolutely no idea where to begin trying to fix this, so that I can just run simple C# builds using Visual Studio. Any suggestions, help, or recommendations would be greatly appreciated!

1 Answer 1

1

It looks like you've done something to screw up your PATH environment variable. Check what you're doing in your shell startup scripts such as .profile, .bash_profile, and .bashrc.

1
  • In particular, look for a command that starts "export PATH=". I'm guessing there's an extra space in there somewhere, but without seeing it that really is just a guess. Commented Apr 5, 2019 at 2:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .