Alex Karasulu wrote:

Jon,

Looks like you fixed it just fine by ignoring the zero length lines
not even reporting an error message.



Yes, but then it's not really an error is it, it's because the shell variables can't easily be parsed using readline.
Shell variables can have newlines and carriage returns in them, IFS (internal field separator) usually does on all unix systems.


my OS is Linux
my shell is bash

Jon

Thanks,
Alex



: 'IFS=         '
: ''
Skipping line - could not find '=' in line: ''
: 'TERM=Eterm'

So I'm only skipping printing a message on empty lines, if by chance someone else IFS is in a different order like \n\t this won't work, I have wondered if it really needs to parse the environment 10 times on a simple merlin run though ;)



That depends on how many time the environment is invoked. We could intialize it once and reuse the Env instance.




RCS file: /home/cvspublic/avalon/util/env/src/java/org/apache/avalon/util/env/Env.java,v
retrieving revision 1.3
diff -u -b -B -r1.3 Env.java
--- Env.java 17 Dec 2003 04:49:20 -0000 1.3
+++ Env.java 21 Jan 2004 00:56:37 -0000
@@ -348,8 +348,10 @@
if ( -1 == l_idx )
{ + if (l_line.length()!=0) {
System.err.println( "Skipping line - could not find '=' in"
+ " line: '" + l_line + "'" ) ;
+ }
continue ;
}





--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to