Re: some variable level issues
On Tuesday 1 July 2008 05:22, Chris F.A. Johnson wrote: > var=${var%.} ITYM var=${var%' .'}
Re: some variable level issues
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
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 wrong if the file doesn't have a trailing > newline You are right. Thanks for correcting me.
Re: process substition and "source"
Poor Yorick wrote: In the following example, I expected the commands in the here-documents to be interpreted in the current shell, but it seems they weren't. Is it my misunderstanding, a feature, or a bug? They're not interpreted in the current shell; in versions of bash up to and including bash-3.2, `.' doesn't work on anything but regular files. This restriction has been lifted in bash-4.0. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer Chet Ramey, ITS, CWRU[EMAIL PROTECTED]http://cnswww.cns.cwru.edu/~chet/
Re: bash --noediting killed by O_NONBLOCK
Glynn Clements wrote: Configuration Information [Automatically generated, do not change]: Machine: i686 OS: linux-gnu Compiler: i686-pc-linux-gnu-gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H -I. -I. -I./include -I./lib -g -O2 -mtune=pentium-m -pipe uname output: Linux cerise 2.6.24.3 #2 SMP Thu Mar 27 10:43:06 GMT 2008 i686 GNU/Linux Machine Type: i686-pc-linux-gnu Bash Version: 3.2 Patch Level: 33 Release Status: release Description: If --noediting is used (e.g. for use with Emacs' shell-mode), and a program run from bash sets O_NONBLOCK on bash's stdin, bash reads and executes random garbags until it eventually segfaults. Repeat-By: bash --noediting Fix: The attached patch appears to fix the specific problem. However, I'm still unclear as to how the original problem occurs. It looks as if the errno != EINTR check should result in a busy-wait. Thanks for the patch. There won't be a busy-wait if nothing's been read into the local buffer: local_bufused == 0 means that the function will return EOF. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer Chet Ramey, ITS, CWRU[EMAIL PROTECTED]http://cnswww.cns.cwru.edu/~chet/