shellcheck reports:
echo -e "blah/blah\n$(cat "$tmpdir"/"$filename".jpdf)" > "$tmpdir"/"$filename".jpdf
^-- SC2094: Make sure not to read and write the same file in the same pipeline.
^-- SC2094: Make sure not to read and write the same file in the same pipeline.
The command is intended to insert a line blah/blah
at the beginning of a file "$tmpdir"/"$filename".jpdf
.
What does "Make sure not to read and write the same file in the same pipeline" mean?
What shall I do instead?
Thanks.