grouper-users - RE: [grouper-users] RE: gsh.sh script whitespace problem
Subject: Grouper Users - Open Discussion List
List archive
- From: Chris Hyzer <>
- To: "Imholz, John J." <>, "'GW Brown, Information Systems and Computing'" <>, "''" <>
- Subject: RE: [grouper-users] RE: gsh.sh script whitespace problem
- Date: Thu, 27 May 2010 11:25:00 -0400
- Accept-language: en-US
- Acceptlanguage: en-US
I added a jira for this. If Gary's idea is acceptable, and it turns out not
to be too risky, we could probably do this for 1.6.1 (not sure when the
release date would be)
https://bugs.internet2.edu/jira/browse/GRP-441
Chris
-----Original Message-----
From: Imholz, John J.
[mailto:]
Sent: Thursday, May 27, 2010 10:28 AM
To: 'GW Brown, Information Systems and Computing'; Chris Hyzer;
''
Subject: RE: [grouper-users] RE: gsh.sh script whitespace problem
Maybe I'm doing it wrong, but I see the need to write some gsh scripts with
loops and conditionals. Collapsing them into one line really hurts
maintainability.
It would be very useful if gsh was BeanShell + Grouper (looks like that's the
design intent of BeanShell.)
http://www.beanshell.org/
jji
-----Original Message-----
From: GW Brown, Information Systems and Computing
[mailto:]
Sent: Thursday, May 27, 2010 3:24 AM
To: Chris Hyzer; Imholz, John J.;
''
Subject: Re: [grouper-users] RE: gsh.sh script whitespace problem
--On 26 May 2010 17:06 -0400 Chris Hyzer
<>
wrote:
> When I look at the code, I *think* all commands must be on their own
> line. GSH is based on bean shell which allows multi-line commands. Not
> sure what the constraint is there, or if there is a workaround, GSH
> predates me... :)
I'm sure you are right. GSH doesn't have any parsing capability of its own
-it just passes each line to bean shell - so, in order not to break what is
there, we would have to introduce additional syntax to allow multi-line
commands e.g. use a \ at the end of any line that continues, build up the
string and pass to bean shell when we get a line not ending with \
Gary
>
> Regards,
> Chris
>
> -----Original Message-----
> From: Imholz, John J.
> [mailto:]
> Sent: Wednesday, May 26, 2010 4:35 PM
> To:
> ''
> Subject: [grouper-users] gsh.sh script whitespace problem
>
> At least I think it's a whitespace problem. I'm confused. (note: my
> subjectIds look like this: "BR549:90067")
>
> Why does this work:
> for ( subject : getMembers("foo:bar" ) ) { print(
> subject.getSubjectId().split( ":" )[1] ); }
>
>
> but this does not:
> for ( subject : getMembers("foo:bar" ) ) {
> print( subject.getSubjectId().split( ":" )[1] );
> }
> // Error: unable to evaluate command: Parse error at line 1, column 69.
> Encountered: <EOF> // Error: unable to evaluate command: Sourced file:
> inline evaluation of: `` print( subject.getSubjectId().split( ":" )[1]
> );'' : Attempt to resolve method: getSubjectId() on undefined variable or
> class name: subject // Error: unable to evaluate command: Parse error at
> line 1, column 1. Encountered: }
>
> jji
----------------------
GW Brown, Information Systems and Computing
- gsh.sh script whitespace problem, Imholz, John J., 05/26/2010
- RE: gsh.sh script whitespace problem, Chris Hyzer, 05/26/2010
- Re: [grouper-users] RE: gsh.sh script whitespace problem, GW Brown, Information Systems and Computing, 05/27/2010
- RE: [grouper-users] RE: gsh.sh script whitespace problem, Imholz, John J., 05/27/2010
- Re: [grouper-users] RE: gsh.sh script whitespace problem, Peter Schober, 05/27/2010
- RE: [grouper-users] RE: gsh.sh script whitespace problem, Chris Hyzer, 05/27/2010
- RE: [grouper-users] RE: gsh.sh script whitespace problem, Imholz, John J., 05/27/2010
- Re: [grouper-users] RE: gsh.sh script whitespace problem, GW Brown, Information Systems and Computing, 05/27/2010
- RE: gsh.sh script whitespace problem, Chris Hyzer, 05/26/2010
Archive powered by MHonArc 2.6.16.