osdir.com
mailing list archive F.A.Q. -since 2001!



Subject: #!Shebang (improved) - msg#00001

List: java.beanshell.user

Mail Archive Navigation:
by Date: Prev Next Date Index by Thread: Prev Next Thread Index

A couple of minor fixes to the `bsh` script:
- ""s to preserve any spaces in arguments or CLASSPATH
- `exec` so that exit/return values are preserved (sent back
to the caller)
- separate `VAR=value` from `export VAR` for maximum backward
compatibility with older versions of `sh`

So, my `/tools/bin/bsh` script looks like:
#!/bin/sh
CLASSPATH="$CLASSPATH:/tools/java/lib/bsh/bsh-2.0b4.jar"
export CLASSPATH
exec java bsh.Interpreter "$@"

All the best,
./ddd

-----Original Message-----
From: beanshell-users-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@xxxxxxxxxxxxxxxx
[mailto:beanshell-users-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@xxxxxxxxxxxxxxxx]
On Behalf Of Owen
Densmore
Sent: Thursday, November 23, 2006 3:25 PM
To: beanshell-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@xxxxxxxxxxxxxxxx
Subject: Re: [Beanshell-users] #!Shebang

On Mac OS X, I just use the env version, which I think is also standard on
all *nix systems now adays.

#!/usr/bin/env bsh
...

.. making sure the file is executable. Then simply launching the file from
the terminal works just fine. The "bsh" script is the usual:
#!/bin/sh
export CLASSPATH=$CLASSPATH:/Users/owen/local/bsh/bsh-2.0b4.jar
java bsh.Interpreter $@
.. which I keep on my PATH, so env finds it.

-- Owen

Owen Densmore http://backspaces.net



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's
Techsay panel and you'll get the chance to share your opinions on IT &
business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Beanshell-users mailing list
Beanshell-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@xxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/beanshell-users


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV


Thread at a glance:

Previous Message by Date:

static imports in Namespace object

Hi, I read in the documentation that static imports are possible in beanshell. How do I set the static import in the NameSpace object (so something similar as using importClass(java.lang.String name)?   Kind regards, Christiaan   ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV_______________________________________________ Beanshell-users mailing list Beanshell-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@xxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/beanshell-users

Next Message by Date:

Getting all vars in a namespace

Team, Does anyone know how to display all variables that exists in a namespace, including all those inherited from their parent lineage? thx for any help. mike ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

Previous Message by Thread:

static imports in Namespace object

Hi, I read in the documentation that static imports are possible in beanshell. How do I set the static import in the NameSpace object (so something similar as using importClass(java.lang.String name)?   Kind regards, Christiaan   ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV_______________________________________________ Beanshell-users mailing list Beanshell-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@xxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/beanshell-users

Next Message by Thread:

Getting all vars in a namespace

Team, Does anyone know how to display all variables that exists in a namespace, including all those inherited from their parent lineage? thx for any help. mike ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
blog comments powered by Disqus

Home | News | Sitemap | FAQ | advertise | OSDir is an Inevitable website. GBiz is too!