LINUX.ORG.RU

История изменений

Исправление Pinkbyte, (текущая версия) :

Поясни, пожалуйста, в чем проблема

mini-router [~]$ cat /etc/alpine-release 
3.15.0
mini-router [~]$ ls -la /bin/sh
lrwxrwxrwx    1 root     root            12 Jan 18 20:06 /bin/sh -> /bin/busybox
mini-router [~]$ cat 1.sh 
#!/bin/sh

# That's a bash feature!!
mapfile ARR < <(echo test)

mini-router [~]$ ./1.sh 
./1.sh: line 4: mapfile: not found
mini-router [~]$ echo $?
127
mini-router [~]$ cat 2.sh 
#!/bin/bash

# That's a bash feature!!
mapfile ARR < <(echo test)

mini-router [~]$ ./2.sh 
mini-router [~]$ echo $?
0

Исправление Pinkbyte, :

Поясни, пожалуйста, в чем проблема

mini-router [~]$ cat /etc/alpine-release 
3.15.0
mini-router [~]$ ls -la /bin/sh
lrwxrwxrwx    1 root     root            12 Jan 18 20:06 /bin/sh -> /bin/busybox
mini-router [~]$ cat 1.sh 
#!/bin/sh

# That's a bash feature!!
mapfile ARR < <(echo test)
mini-router [~]$ ./1.sh 
./1.sh: line 4: mapfile: not found
mini-router [~]$ echo $?
127
mini-router [~]$ cat 2.sh 
#!/bin/bash

# That's a bash feature!!
mapfile ARR < <(echo test)
mini-router [~]$ ./2.sh 
mini-router [~]$ echo $?
0

Исходная версия Pinkbyte, :

Поясни, пожалуйста, в чем проблема

mini-router [~]$ cat /etc/alpine-release 
3.15.0
mini-router [~]$ ls -la /bin/sh
lrwxrwxrwx    1 root     root            12 Jan 18 20:06 /bin/sh -> /bin/busybox
mini-router [~]$ cat 1.sh 
#!/bin/sh
# That's a bash feature!!
mapfile ARR < <(echo test)
mini-router [~]$ ./1.sh 
./1.sh: line 4: mapfile: not found
mini-router [~]$ echo $?
127
mini-router [~]$ cat 2.sh 
#!/bin/bash

# That's a bash feature!!
mapfile ARR < <(echo test)
mini-router [~]$ ./2.sh 
mini-router [~]$ echo $?
0