Quantcast

Researching Unix Shells

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Researching Unix Shells

mblahay
I am in the process of researching Unix Shell alternatives and this one came up. Can BeanShell 2 be used as a Unix command shell?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Researching Unix Shells

daluu
Sort of, depending on what you're thinking. I believe it can only be used in these ways as a command shell to Unix:

Using relevant Java class methods (or Beanshell equivalents) to do things you normally do in command shell (e.g. file I/O, execute applications, move/rename/delete/create files/directories, etc.). So you'll be using Java code to do it rather than shell commands/scripts, and this Java code will execute via Beanshell like interactive script rather than compile then execute with normal Java. This approach is same as using Python, Ruby, or Perl as a replacement for Unix shell, via their interfaces for interactive console/shell vs option to execute a written script file.

Using Beanshell Java code to make shell calls to call the actual Unix shell commands you want to run. Frankly, there's not much point to doing it this way. More work just to do same thing as using normal Unix shell.
Loading...