builtin read stops at '\0'
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-unknown-linux-gnu' -DCONF_VENDOR='unknown' -DLOCALEDIR='/usr/local/share/locale' -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H -I. -I. -I./include -I./lib -g -O2 uname output: Linux brahma 2.6.38-2-amd64 #1 SMP Sat Apr 23 18:47:49 UTC 2011 x86_64 GNU/Linux Machine Type: x86_64-unknown-linux-gnu Bash Version: 4.2 Patch Level: 0 Release Status: release Description: The builtin read command does not work like e.g. dash or zsh w.r.t. the null character '\0', however I'm not sure it can be considered as a bug. If a line containing the '\0' is read into a variable, the content of this variable does not contain the part after the '\0' character. Repeat-By: echo -e 'a\0b' | (read f; echo $f) The output is 'a', and '\0b' is stripped.
How does one make a bash "builtin" (shared loadable module) on cygwin?
I am trying to build a bash builtin on cygwin. Here's the error message I get via automake/make: $ make gcc -g -O2 -o set0.exe -shared set0-set0.o set0-set0.o: In function `set0_builtin': /tmp/bashdb/builtin/set0.c:46: undefined reference to `_builtin_error' /tmp/bashdb/builtin/set0.c:47: undefined reference to `_builtin_usage' /tmp/bashdb/builtin/set0.c:51: undefined reference to `_dollar_vars' /tmp/bashdb/builtin/set0.c:52: undefined reference to `_xmalloc' /tmp/bashdb/builtin/set0.c:52: undefined reference to `_dollar_vars' /tmp/bashdb/builtin/set0.c:42: undefined reference to `_builtin_error' /tmp/bashdb/builtin/set0.c:43: undefined reference to `_builtin_usage' collect2: ld returned 1 exit status make: *** [set0.exe] Error 1 Perhaps I need to tell cygwin that these symbols are supposed to be undefined since they are part of bash? Thanks for the help or suggestions, rocky