Skip to Content.
Sympa Menu

grouper-users - Re: [grouper-users] RE: gsh.sh script whitespace problem

Subject: Grouper Users - Open Discussion List

List archive

Re: [grouper-users] RE: gsh.sh script whitespace problem


Chronological Thread 
  • From: "GW Brown, Information Systems and Computing" <>
  • To: Chris Hyzer <>, "Imholz, John J." <>, "''" <>
  • Subject: Re: [grouper-users] RE: gsh.sh script whitespace problem
  • Date: Thu, 27 May 2010 08:23:59 +0100

--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




Archive powered by MHonArc 2.6.16.

Top of Page