Quote:
Originally Posted by
High-T
Is it possible if I can put a time interval between the awk script and mv commands??
This would resolve my issue.
Yes you can put a time interval between the
awk script and the
mv command. (Look at the man page for
sleep.) Doing so will make your shell script run longer, but will not make any difference in the results on any properly working system.
Unless something else is going on that you have not shown us, sleeping for a microsecond or sleeping for an hour will not make any difference at all.
You have shown us that
awk is reading a file and nothing is writing to that file until
awk finishes. Then, only after
awk finishes, you
mv a file. No delay added between the
awk and the
mv should make any difference at all unless you're running the
awk asynchronously (and you have not shown us any script where the
awk command is terminated by an ampersand).
Unless something is going on that you have not shown us, adding a
sleep will not resolve your issue.