0

We are investigating possibility of using BeanShell to write scripts that do a lot of file operations. Currently bash scripts are used.

Now the main question is - is BeanShell stable at this moment? I know that it is not actively supported , but does that matter? Are there bugs? What about BeanShell2? Is it original plus some bug-fixes? Or are there other changes?

I am also wondering if at this point in time using Groovy is better given that it is actively supported and developed by Pivotal.

Any additional information regarding pros and cons of either Bash scripts, BeanShell and Groovy scripts is greatly appreciated.

4 Answers 4

3

You really haven't given us much to go on here. No specifics about your environment, not much in the way of criteria. Nothing really about the problems that you are trying to solve with scripting. You are clearly thinking about moving away from bash for some reason, but you haven't really told us why.

If you are comfortable with bash, then I agree with @Nick Ellis. Stick with it.

However, if for some reason you are determined to choose either Groovy or Beanshell, the choice is pretty clear. Groovy is a well-supported language whose user base and application base are both growing by leaps and bounds. Beanshell... not so much.

1

I searched around to understand the current situation a few months ago and here are my findings.

  1. Original release from http://www.beanshell.org hasn't been updated since 2.0b4
  2. In maven repository, last release from benshell.org is 2.0b5 on Jun, 2005.
  3. In 2011, beanshell2 was forked. Last release was v2.1.8 on Feb 20,2014. This fork is never released to maven repo.
  4. In 2012, there was a discussion on apache commons-dev to adopt beanshell.
  5. In 2013, it was reminded that it was not voted on incubator list.
  6. Shortly after, it was proposed and voted on incubator-general.
  7. But then, it was followed by a discussion that it should be put into sandbox.
  8. In 2015, beanshell2 was cloned to github from google code.
  9. Also on 2015-09-23, apache-extras repository was moved from google code to https://github.com/beanshell/beanshell/. (I missed the creation of original repository)
4
  • Any stats or information on how widely BeanShell or BeanShell2 are used in the industry? Are they popular? Oct 25, 2014 at 17:25
  • I just noticed that there is clone repository of beanshell2 in github by automatic conversion from google code so noted here.
    – hshib
    Nov 19, 2015 at 15:36
  • I'm the owner of above mentioned github clone and one of the project owners on google code. So it was not a "3rd party person" who initiated the migration. And there is also a new effort by the Apache organization at github.com/beanshell (where I'm also a member)
    – Peter
    Nov 25, 2015 at 19:49
  • Thanks Peter. I removed mention of "3rd party person". Also thanks for the github.com/beanshell reference. So should that be considered as the current "official" repository of the beanshell code? What is the relationship if that repository and your beanshell2?
    – hshib
    Nov 25, 2015 at 23:52
0

I would stick with bash. Even if one of these scripting languages is better in the sense that it has features you want, is easier to use, or has more support, you still need to switch from bash to this other language. Furthermore bash is drastically more common and well known, which means it is easier to find people who know it and find solutions on line. Without a very strong reason, such as a feature you need that bash doesn't provide, it seems like making the switch would be a lot of trouble without gaining much ground.

2
  • I'd also add extremely fast start for bash. That's why gvm uses bash in it's scripts.
    – Opal
    Oct 24, 2014 at 16:49
  • I believe ubiquity was chosen over speed in this instance
    – tim_yates
    Oct 24, 2014 at 19:18
0

Adding to @hsib answer, There's a new 2.0b6 version:

2016-02-18 Security update

Note: A security vulnerability has been identified in BeanShell that could be exploited for remote code execution in applications that has BeanShell on its classpath (CVE-2016-2510). The vulnerability has been fixed in the security update BeanShell 2.0b6.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.