Re: \w, $PWD and pwd builtin return "//" instead of '/'

2019-01-12 Thread mike b
o say. Or at least remember to run through the FAQ. :) Anyways, thanks for your feedback! niedz., 13 sty 2019 o 02:43 Chet Ramey napisał(a): > On 1/12/19 7:52 PM, mike b wrote: > > Upon changing directory, with "//" passed as an argument, the trailing > '/' > &g

\w, $PWD and pwd builtin return "//" instead of '/'

2019-01-12 Thread mike b
Upon changing directory, with "//" passed as an argument, the trailing '/' is still displayed when cwd is looked up by Bash: bash-5.0# cd // bash-5.0# pwd // bash-5.0# echo $PWD // bash-5.0# PS1=${PS1/\$/\w\\$} bash-5.0//# # \w -> "//" bash-5.0//# /bin/pwd # <- coreutils implementation / bash-5.0

Re: Reading from a file by using its FD returns its contents only once

2018-12-31 Thread mike b
I have the full picture now. Thank you all for your feedback!

Re: Reading from a file by using its FD returns its contents only once

2018-12-31 Thread mike b
That's a good point, I haven't thought about it like this. I always thought that each read always starts at the beginning of the file given fd points at. So the fact that it changes offset is a bit surprising: # echo word >t # exec {in} napisał(a): > On Mon, Dec 31, 2018 at 2:37

Reading from a file by using its FD returns its contents only once

2018-12-30 Thread mike b
Configuration Information: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H -I. -I

Re: Unexpected (?) segfault after unset LANG

2018-02-09 Thread mike b
en code after first call, however, after LANG is toggled, printf keeps returning just the code. I guess my question here is: why that happens? I mean, I would expect it to decode it whenever LANG is set back to UTF-8 in this case. Am I missing something here? 2018-02-09 17:29 GMT+01:00 Chet Ramey

Re: Unexpected (?) segfault after unset LANG

2018-02-09 Thread mike b
1b in execute_command_internal () #10 0x0043737e in execute_command () #11 0x004213be in reader_loop () #12 0x0041fca5 in main () (gdb) 2018-02-09 16:21 GMT+01:00 Chet Ramey : > On 2/9/18 9:55 AM, mike b wrote: > > > Bash Version: 4.3 > > Patch Level: 33 >

Unexpected (?) segfault after unset LANG

2018-02-09 Thread mike b
Configuration Information: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H -I. -I

UID|EUID variables lose their ro properties

2017-11-03 Thread mike b
Hi! Below is some odd stuff I recently noticed, looks to me as a bug, though it's better if smarter people than me look at it as well to confirm that. :) Configuration Information: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OS