スクリプトが機能するのに機能し#!/bin/bashない理由を理解しようとしてい#!/bin/shます。Cygwinと両方sh.exeを実行していますが、bash.exe同じ(同じファイルサイズ)のようです。
$ 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