[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-bash] Command Substition (using tail) in exec line stopped working
From: |
Erik Ackermann |
Subject: |
[Help-bash] Command Substition (using tail) in exec line stopped working |
Date: |
Fri, 14 Oct 2016 11:35:58 -0700 |
So I just posted a more detailed, formatted version on stackexchange, but
wanted to reach out here as well, particularly since this might be a
regression, or at least a new behavior I was not aware of.
http://unix.stackexchange.com/questions/316479/bash-command-
substitution-in-exec-line-some-commands-stopped-working
Basically though, this command works (script.sh writes to /tmp/log):
exec ./script.sh >(cat > log)
While this one does not work (file created but no contents):
exec ./script.sh >(tail > log)
Where script.sh contains:
#!/bin/bash
echo "fd: $1" >/tmp/out
ls -l "$1" >>/tmp/out
echo "SUCCESS" > "$1"
In both cases /tmp/out shows a writable fd.
It's a boiled down example of something that's been in my .bashrc for a
long time, but just noticed it stopped working on my machine recently. Is
there something special about the tail/head commands that makes this not
work..?
Bash version: GNU bash, version 4.3.11(1)-release (x86_64-pc-linux-gnu)
- [Help-bash] Command Substition (using tail) in exec line stopped working,
Erik Ackermann <=