I have a script with multiple temp files. Multiple users can run the script. However, I need to avoid overwriting input files when multiple users run the script at the same time.
What is the best possible thing I can use?
cat inputfile | while read j
do
sed 's/beth/Beth/' >> temp1
cat temp2 | awk '{print $2}' >> temp2
cat temp2
done
the input file shoudn't override if other user update it before i run my script