So I have a bash command using process substitution in an exec line that stopped working recently, and it boils down to this example:
Contents of script.sh:
#!/bin/bash ls -l "$1" >/tmp/out echo "SUCCESS" > "$1"
This works, putting "SUCCESS" into
rm -f log; ./script.sh >(cat >log)
tail also works:
rm -f log; ./script.sh >(tail >log)
rm -f log; exec ./script.sh >(cat >log)
tail does NOT work:
rm -f log; exec ./script.sh >(tail >log)
In all cases, the contents of /tmp/out look okay, looking something like:
l-wx------ 1 user user 64 Oct 14 10:55 /dev/fd/63 -> pipe:
cat work but not
head? This was working at sometime in the past.. is this a bash feature change or bug regression..?
bash --version: GNU bash, version 4.3.11(1)-release (x86_64-pc-linux-gnu)