bash process substitution weird behavior

2015-12-08 Thread Hyunho Cho
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-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale'

$OPTIND varibale value is different from sh

2018-06-20 Thread Hyunho Cho
if $OPTIND value start from 1 then i think "-b" $OPTIND should be "3" like sh but bash print "2" set -- -a -bc hello world echo $OPTIND# sh, bash = 1 getopts abc opt "$@" echo $opt, $OPTIND # sh, bash = a, 2 getopts abc opt "$@" # bash = b, 2

Things that work in bash-5.0 but not work in bash-5.1-rc1

2020-10-07 Thread Hyunho Cho
< bash-5.0 > $ read rows cols < <(stty size) $ echo $rows $cols 19 95 < bash-5.1-rc1 > $ read rows cols < <(stty size) stty: 'standard input': Inappropriate ioctl for device $ echo $rows $cols < empty

coproc does not work in subshell

2020-10-02 Thread Hyunho Cho
Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -g -O2 -fdebug-prefix-map=/build/bash-a6qmCk/bash-5.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -Wno-parentheses -Wno-format-security uname output: Linux EliteBook 5.4.0-42-generic #46-Ubuntu SMP Fri Jul 10

background process in command substitution

2020-10-07 Thread Hyunho Cho
There are cases that need not wait until background process finish -- In this case, zsh and bash wait 3 seconds to finish the assignment operation. because sleep command's STDOUT is the pipe of command substitution. < zsh > $

Commands that work in bash-5.0 but not in bash-5.1-rc1

2020-10-16 Thread Hyunho Cho
< bash-5.0 > bash$ echo hello | cat <(cat) > >(tr a-z A-Z) HELLO < bash-5.1-rc1 > bash$ echo hello | cat <(cat) > >(tr a-z A-Z) <-- empty --- < bash-5.0 > bash$ cat <<\@ | gcc -fPIC -shared

problem with using ctrl-x ctrl-e ( open vi editor )

2020-10-18 Thread Hyunho Cho
Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -g -O2 -fdebug-prefix-map=/build/bash-a6qmCk/bash-5.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -Wno-parentheses -Wno-format-security uname output: Linux EliteBook 5.4.0-42-generic #46-Ubuntu SMP Fri Jul 10

bash errexit shell option does not work in some cases.

2020-05-31 Thread Hyunho Cho
GNU bash, version 5.0.16(1)-release (x86_64-pc-linux-gnu) Operating System: Ubuntu 20.04 LTS Kernel: Linux 5.4.0-33-generic Architecture: x86-64 bash errexit shell option does not work in some cases. after execution a command, exitcode is set to "1" but shell script does not exited.

multi-line command history does not work when new terminal opened

2020-08-16 Thread Hyunho Cho
Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -g -O2 -fdebug-prefix-map=/build/bash-a6qmCk/bash-5.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -Wno-parentheses -Wno-format-security uname output: Linux EliteBook 5.4.0-42-generic #46-Ubuntu SMP Fri Jul 10

heredoc seems to parse contents even with the quoted delimiter in shell prompt

2020-08-16 Thread Hyunho Cho
Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -g -O2 -fdebug-prefix-map=/build/bash-a6qmCk/bash-5.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -Wno-parentheses -Wno-format-security uname output: Linux EliteBook 5.4.0-42-generic #46-Ubuntu SMP Fri Jul 10

Problems with command substitution and command alias

2020-11-21 Thread Hyunho Cho
Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -g -O2 -fdebug-prefix-map=/build/bash-a6qmCk/bash-5.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -Wno-parentheses -Wno-format-security uname output: Linux EliteBook 5.4.0-42-generic #46-Ubuntu SMP Fri Jul 10

Arithmetic pow results incorrect in arithmetic expansion.

2021-01-08 Thread Hyunho Cho
Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -g -O2 -fdebug-prefix-map=/build/bash-a6qmCk/bash-5.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -Wno-parentheses -Wno-format-security uname output: Linux EliteBook 5.4.0-42-generic #46-Ubuntu SMP Fri Jul 10

Re: Arithmetic pow results incorrect in arithmetic expansion.

2021-01-08 Thread Hyunho Cho
I didn't know that all other shells work the same. Thanks for the clarification. 2021년 1월 9일 (토) 오후 2:29, Lawrence Velázquez 님이 작성: > > On Jan 8, 2021, at 11:19 PM, Hyunho Cho wrote: > > > > Machine: x86_64 > > OS: linux-gnu > > Compiler: gcc > > Compilati

bash command alias has a problem in using brace.

2021-08-27 Thread Hyunho Cho
Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -g -O2 -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -Wall uname output: Linux EliteBook 5.11.0-25-generic #27-Ubuntu SMP Fri Jul 9 23:06:29 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux Machine

read built-in command has a problem in shell function

2021-10-11 Thread Hyunho Cho
Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -g -O2 -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -Wall uname output: Linux EliteBook 5.11.0-25-generic #27-Ubuntu SMP Fri Jul 9 23:06:29 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux Machine

bash command completion has a problem with sudo command

2022-08-22 Thread Hyunho Cho
Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -g -O2 -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -Wall uname output: Linux EliteBook 5.15.0-43-generic #46-Ubuntu SMP Tue Jul 12 10:30:17 UTC 2022 x86_64 x86_64

Parameter expansion with extended pattern make system hang

2022-09-04 Thread Hyunho Cho
Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -g -O2 -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -Wall uname output: Linux EliteBook 5.15.0-43-generic #46-Ubuntu SMP Tue Jul 12 10:30:17 UTC 2022 x86_64 x86_64

regex string ">(...)" in [[ ]] command recognize as process substitution

2022-10-30 Thread Hyunho Cho
## Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -g -O2 -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -Wall uname output: Linux EliteBook 5.19.0-23-generic

bash "extglob" needs to upgrade at least like zsh "kshglob"

2022-10-28 Thread Hyunho Cho
## Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -g -O2 -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -Wall uname output: Linux EliteBook 5.19.0-23-generic

Unnecessary bash warning message

2023-05-07 Thread Hyunho Cho
### Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -g -O2 -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -Wall uname output: Linux EliteBook 6.2.0-20-generic