[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Issue using file descriptor assigned file resides in /tmp
From: |
Tapani Tarvainen |
Subject: |
Re: Issue using file descriptor assigned file resides in /tmp |
Date: |
Thu, 13 Jul 2023 23:20:29 +0300 |
On Fri, Jul 14, 2023 at 03:06:09AM +0700, Budi (budikusasi@gmail.com) wrote:
> Anyone experienced too:
> Bash cannot use file descriptor assigned file that resides in /tmp ?
Your problem has nothing to do with the file being in /tmp.
> exec 3< <(/tmp/dls1)
That's wrong syntax. The <() construct is for process
substitution, not for reading a file.
What you want is simply
exec 3< /tmp/dls1
> while read -r -u3 f1; read -r f2
> do
> # ...
> done < <(cat /tmp/dls2)
While that works, you don't need process substitution
or cat there either. Just do
done < /tmp/dls2
> bash: /tmp/dls1: Permission denied
That's because it tries to use /tmp/dsl1 as a command,
and it's not executable.
--
Tapani Tarvainen