I have one input file ABC.txt and one output DEF.txt. After the ABC is processed and created output, I want to rename ABC.txt to ABC.orig and DEF to ABC.txt. Currently when I am doing this, it does not process the input file as it cannot read and write to the same file. How can I achieve this?
Is it possible if I can put a time interval between the awk script and mv commands??
This would resolve my issue.
Example:
ABC.txt
DEF.txt
Is it possible if I can put a time interval between the awk script and mv commands??
This would resolve my issue.
Example:
Code:
awk ' $1=="01" { print $2 $4}' ABC.txt > DEF.txt
mv ABC.txt ABC.orig
mv DEF.txt ABC.txt
Code:
01 03 03 04
Code:
01 08 AA FA