I have a shell script for working with text conversions, but it is cumbersome to use and relies on manual judgment and execution. It works as follows.
Step 1: download raw data text.
Step 2: Manually compare the contents of the last downloaded file for differences.
The content format of the text is relatively simple, one string per line. If the content has increased, you need to run script processing.
# Last downloaded file content: wtKpjv uJlQm1 iS86aE Hk6ycS hAYj7k # Now downloaded file content: wtKpjv uJlQm1 RiU8iM iS86aE Hk6ycS qyDNaZ hAYj7k # Compare the increased content: RiU8iM qyDNaZ
Step 3: If there is a difference in the comparison results, you need to run script processing.
./text_processing.sh raw.txt > new.text
The above is my current usage steps. How do I set up an automated task to complete this process?
I want to check it once a day. If the text content is updated, I need to run the script immediately. If there are no changes, the script is run every 3 days.
I would really appreciate if anyone can help me..