Today I learned how to create javascripts in the Shell environment. Mike Chamber’s webpage is really helpful. In this article he mentioned this file”.bash_profile”, which I couldn’t find in my OS X terminal. After some researching I realized this is something we create: create a “.bash_profile” file under the root directory (for OS it’s User/YOUR USERNAME/), and whenever you open a terminal window, it’ll automatically execute the commands in the file. At first I used the text editor to write Mike Chamber’s modified .bash_profile, but I had to use the “Vi” editor in Shell to clean up some random symbols created by my texteditor. And voila, it worked!
From now on, I can directly execute javascript commands in my terminal. Here’s mozilla’s resource page on Rhino.




