I downloaded and installed the SML NJ implementation using the DMG for x86 from here :
http://smlnj.cs.uchicago.edu/dist/working/110.72/index.html
However when I open a terminal window and go to /usr/local/smlnj-110.72/bin and run sml i get a bash command not found.
I am not very familiar with UNIX so I guess I am doing something wrong.
Thanks for the help!
Add the following line to your ~/.bash_profile
export PATH=$PATH:/usr/local/smlnj/bin
Then open a new terminal window and run sml.
After going to the /usr/local/smlnj-xxx/bin directory, you need to run ./sml
(as opposed to sml) because the current directory (.) is not on the default path on Unix.
Related
So I was watching a tutorial on laravel and the tutor in the vid enters the command on the terminal as shown in the picture. He said we can use touch command on mac but to keep compatible on windows he's using vim. I don't believe he has vim.exe on his laravel project folder. Project name is freecodeGram as in pic. How do i get my computer to understand the vim command. Thanks in advance, I'm on windows.
Command was: vim database/database.sqlite
You need to add the path to vim.exe to your system PATH. This would allow you to type vim ..... in the CLI and would execute vim directly. Otherwise, prefix vim database/database.sqlite with c:/path/to/vim database/database.sqlite
I am a bit surprised, but I can't run matlab by the terminal of my Mac.
I am trying the command
/Applications/MATLAB_R2015b.app/bin/matlab
but I get the error
-bash: matlab: command not found
Listing the contenents of the folder /Applications/MATLAB_R2015b.app/bin/ I can see the word matlab which is supposed to be the executable.
I don't know what's happening.
Try
cd /Applications/MATLAB_R2015b.app/bin/
and then
./matlab
If that, hopefully, works, then you may have a path or environment issue with your O/S which is preventing your call to /Applications/MATLAB_R2015b.app/bin/matlab from working.
add the installation directory to the PATH environment, for example:
export PATH=/Applications/MATLAB_R2017b.app/bin/:$PATH
then launch Matlab with
matlab
in your terminal
It works fine, however, if you used the default folder it would be something like export PATH=/usr/local/MATLAB/R2021b/bin/:$PATH
Additionally, remember about activating matlab before via running the activate_matlab.sh script located in the installation folder
I've got a question about installing ANTLR on my Unix system (MacOS Sierra).
I followed the Quick Start steps (ANTLR 4 Quick Start installation steps for OS X) as described on the homepage of ANTLR 4. Everything seems to be working fine but whenever i close my Terminal the export and alias commands seem to have disappeared. Does anyone have an idea what i might be doing wrong? Thank you!
p.s. I'm new to OS X and using the terminal.
Append the export and 2 alias commands to the .bash_profile file in your home directory.
Every time you open a terminal, the contents of that file is loaded.
So the steps i took was as followed;
Open terminal
enter cd /usr/local/lib
enter sudo curl -O http://www.antlr.org/download/antlr-4.5.3-complete.jar
enter touch ~/.bash_profile; open ~/.bash_profile
Text editor opens up.
Paste the following;
export CLASSPATH=".:/usr/local/lib/antlr-4.5.3-complete.jar:$CLASSPATH"
alias antlr4='java -jar /usr/local/lib/antlr-4.5.3-complete.jar'
alias grun='java org.antlr.v4.gui.TestRig'
Save the file
reopen the terminal. Test if antlr4 and grun works.
I am a mac user and I have maple installed on my computer. I can open maple like any other app. However I would like to work in terminal. I googled and
found that I can do that but I need to change some path. It was not well explained. I would really appreciate if someone can help me setting my path.
Thanks in advance.
You do not have to adjust the PATH environment variable. Doing so just makes calling the maple launch script for the Commandline Interface (aka CLI) a little easier.
Open a terminal window (xterm). Find the maple script of your Maple installation. Perhaps it will be located in some directory like /Library/Frameworks/Maple.framework/Versions/Current/bin/ say. You should be able to run that script in your terminal by running it using the full name, eg. /Library/Frameworks/Maple.framework/Versions/Current/bin/maple.
You could also alias the full name (explicit location) to some single short word.
That maple script sets everything it needs to run the Maple binaries, etc. You just have to run it (in a terminal).
Or you could make OSX launch a terminal window and call the maple script. Doesn't OSX have an automator for adding such things to the Dock? I forget the syntax but could it be something like,
open -a "/opt/X11/bin/xterm" --args "-e /Library/Frameworks/Maple.framework/Versions/Current/bin/maple"
I want cscope to open files in MacVim instead of vim, so I'm trying to have the path to MacVim as the Value of the EDITOR environment variable which is used by cscope:
$ export EDITOR=/Applications/MacVim.app/Contents/MacOS/MacVim
If I'm now trying to edit a file from within ctags, it won't work and throws this error message:
$ MacVim[8384:10b] No Info.plist file in application bundle or no NSPrincipalClass in the Info.plist file, exiting
Calling MacVim from the commandline with
$ /Applications/MacVim.app/Contents/MacOS/MacVim
works, though.
How can I fix this?
Make sure you put the mvim script in your path, and try this out:
export EDITOR="mvim -f"
This was the ticket for me when using MacVim as editing git commit messages.
Have you tried export EDITOR=/Applications/MacVim.app?
Or wrapping MacVim in a small script that uses open to start the app?
It works fine for me when I set my EXPORT variable to exactly that, and start a git commit. What are you using that's calling it? Have you considered setting EXPORT to point to the mvim script that comes on the MacVim disk image instead?
<plug>
My launch tool is designed for this. It's like Apple's open, but allows you to get the path to an application bundle rather than launching it. For example:
% launch -ni com.apple.safari
/Applications/Safari.app
launch is in Fink and MacPorts too.
</plug>