¿Por qué funcionará el script con / bin / bash pero no con / bin / sh?
Estoy tratando de entender por qué el script funcionará con#!/bin/bash
pero no#!/bin/sh
. Estoy corriendo Cygwin y ambossh.exe
ybash.exe
Parecen ser idénticos (mismo tamaño de archivo).
$ cat 1.sh
#!/bin/sh
while read line; do
echo ${line:0:9}
done < <(help | head -5)
$ ./1.sh
./1.sh: line 4: syntax error near unexpected token `<'
./1.sh: line 4: `done < <(help | head -5)'
$ cat 2.sh
#!/bin/bash
while read line; do
echo ${line:0:9}
done < <(help | head -5)
$ ./2.sh
GNU bash,
These she
Type `hel
Use `info
Use `man