My goal is to do a "while read" command with process substitution of a find command.
Schematically:
while read ...; do
While I can make this work on Linux and my Mac, I cannot make it work on FreeNAS.
Simplifying: under Bash
echo >(true) ... works
echo <(true) ... works
wc <(cat file.txt) ... does not work ... terminates in a wc: /dev/fd/63: open: No such file or directory
I understand that process substitution is not POSIX compliant ... but the shell understands the first two commands without complaining about syntax ... the last command fails. I know you can use named pipes, but I'd rather not have to deal with two shells. I cannot find any information in the forums on this ... well there's one hit ... but not really the same.
Mac is supposedly BSD-based ... as might be FreeBSD, the father of FreeNAS ... so I'm wondering why I'm having luck with my Mac and not FreeNAS.
So if someone could give me some help here I'd really appreciate it! Thank you!
Schematically:
while read ...; do
stuff
done < <(find ...)While I can make this work on Linux and my Mac, I cannot make it work on FreeNAS.
Simplifying: under Bash
echo >(true) ... works
echo <(true) ... works
wc <(cat file.txt) ... does not work ... terminates in a wc: /dev/fd/63: open: No such file or directory
I understand that process substitution is not POSIX compliant ... but the shell understands the first two commands without complaining about syntax ... the last command fails. I know you can use named pipes, but I'd rather not have to deal with two shells. I cannot find any information in the forums on this ... well there's one hit ... but not really the same.
Mac is supposedly BSD-based ... as might be FreeBSD, the father of FreeNAS ... so I'm wondering why I'm having luck with my Mac and not FreeNAS.
So if someone could give me some help here I'd really appreciate it! Thank you!