Re: some variable level issues

2008-07-01 Thread pk
On Tuesday 1 July 2008 09:51, Pierre Gaston wrote: > 2008/7/1 pk <[EMAIL PROTECTED]>: >> On Tuesday 1 July 2008 05:22, Chris F.A. Johnson wrote: >> >>> var=${var%.} >> >> ITYM >> >> var=${var%' >> .'} > > that would defeat the purpose of keeping the trailing newlines of > file, and would just be

Re: some variable level issues

2008-07-01 Thread Pierre Gaston
2008/7/1 pk <[EMAIL PROTECTED]>: > On Tuesday 1 July 2008 05:22, Chris F.A. Johnson wrote: > >> var=${var%.} > > ITYM > > var=${var%' > .'} that would defeat the purpose of keeping the trailing newlines of file, and would just be wrong if the file doesn't have a trailing newline

Re: some variable level issues

2008-07-01 Thread pk
On Tuesday 1 July 2008 05:22, Chris F.A. Johnson wrote: > var=${var%.} ITYM var=${var%' .'}

Re: some variable level issues

2008-06-30 Thread Chris F.A. Johnson
On 2008-06-29, Matt Zyzik wrote: > bug-bash, > 2. $( want any newlines chopped off. So to remedy this, I do the > following: "IFS='' read -r -d '' var < file". Firstly, is this safe > to do, and are there any other ways? Secondly, it appears to be very > slow compared to $(http://Woodbine-Gerr

Re: some variable level issues

2008-06-30 Thread Chet Ramey
Matt Zyzik wrote: 1. I noticed bash variables don't support null characters (0x00). This is unlike perl and other languages. Will this ever change? Have people requested or wanted this feature? Probably not; it would require considerable reworking of the variable internals. 2. $( Probably.

Re: some variable level issues

2008-06-29 Thread Eric Blake
> > 1. I noticed bash variables don't support null characters (0x00). This is > unlike > perl and other languages. Will this ever change? Have people requested or > wanted > this feature? POSIX says that the use of NUL bytes gives undefined behavior in a shell. zsh supports this, but it would