Referring to this answer of mine which I used the same
tmp file for the input to the process-substitution and also writing the output to the same
tmp file in parent shell, does this will cause any interruption when reading in process-substitution and writing by the shell?
based on discussion in the comments and a similar post I found, seems that should not be conflict, right?
grep -xvFf <(cut -d'/' -f1 tmp) ext >> tmp
Related discussions in comments:
This looks very elegant, but isn't
tmpis being read and written to at the same time? – Quasimodo
@Quasímodo no, child-shell opens the
tmpfor reading only and redirection is done after
grepdone the processioning thought and shell open the
tmpagain for writing (But still I'm not expert on this to 100% confirm that) – αғsнιη
strace grep …shows that it opens by grep and close after finish, and so after grep done shell write the output to
tmp, so that will not interrupt at the same time – αғsнιη