Re: Cannot process scripts beyond an embedded NULL character when running in 'source' mode

2009-07-29 Thread Roman Rakus

On 06/16/2009 11:55 AM, Roman Rakus wrote:

On 06/02/2009 01:33 PM, Roman Rakus wrote:
When you are sourcing bash script, which contains \0 character, bash 
thinks it is end of file.
I have investigated, that `source' loads entire file into memory as 
string. Then \0 is end of this string.
One of the possible solution is to left out all \0 characters. This 
doesn't seem to be perfect.
Another possible solution is to count size of the file and then 
compare the size with actual string parsing.

Maybe other solutions...

Which solution should be the best?
RR


This patch will delete all `\0' characters which are not at the end of 
sourced file.

RR

Any update, comments, activity...?
RR




Re: Cannot process scripts beyond an embedded NULL character when running in 'source' mode

2009-07-29 Thread Chet Ramey
> > This patch will delete all `\0' characters which are not at the end of 
> > sourced file.
> > RR
> Any update, comments, activity...?

A solution will be in the next version of bash.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer

Chet Ramey, ITS, CWRUc...@case.eduhttp://tiswww.tis.case.edu/~chet/




Porting GNU Projects - BASH

2009-07-29 Thread bornlibra23

Hello People
I am trying to port various GNU products to Stratus OpenVOS platform
including the baash shell. However I am stuck currently for the lack of wide
& multibyte character support. Can somebody guide me to an implementation of
the same that I can port first. The glibc is also proving a monster to port
for various reasons. I have tried to build the wide character support of
glibc separately but it didnt workout. Can somebody isolate the code & guide
me in implementing it on VOS? This is proving to be a major blocker. Please
help
Thanks
bornlibra23
-- 
View this message in context: 
http://www.nabble.com/Porting-GNU-Projects---BASH-tp24721339p24721339.html
Sent from the Gnu - Bash mailing list archive at Nabble.com.





Re: parse error running builtins from array

2009-07-29 Thread mk27


>Take a look at the arguments you are actually using:

[root~] printf "%s" ${cc[1]}
bash-c"timels-l"

Again, I can't see the missing "

>use eval

I didn't know the shell had an eval so that solves that!

Much thanks.

-- 
View this message in context: 
http://www.nabble.com/parse-error-running-builtins-from-array-tp24705077p24720869.html
Sent from the Gnu - Bash mailing list archive at Nabble.com.





Re: parse error running builtins from array

2009-07-29 Thread Chris F.A. Johnson
On Wed, 29 Jul 2009, mk27 wrote:

 
> >Take a look at the arguments you are actually using:
> 
> [root~] printf "%s" ${cc[1]}
> bash-c"timels-l"
> 
> Again, I can't see the missing "

   Try using the code I posted:

printf "%s\n" ${cc[1]}


-- 
   Chris F.A. Johnson, webmaster 
   ===
   Author:
   Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)




Re: parse error running builtins from array

2009-07-29 Thread Andreas Schwab
mk27  writes:

>>Take a look at the arguments you are actually using:
>
> [root~] printf "%s" ${cc[1]}
> bash-c"timels-l"
>
> Again, I can't see the missing "

Try your original example after set -x.

Andreas.

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."