I have two different text files (temp1.txt,temp2.txt) with results from multiple ls -l commands. I want to check the below using shell and in a if loop
- If the two
*.txtfiles are same - execute xyz, exit since no action is required. - If a filename is present only in temp1.txt and not in temp2.txt - execute abc
- If the filename is present only in temp2.txt and not in temp2.txt - execute jkl
- if file in temp1.txt is newer (based on timestamp) - execute awar
My *.txt files will be in this format with multiple lines
20201207 0050 0 wf135r217.config
I'm new to shell and could not do anything except the 1st step. Any help is appriciated.
Aucun commentaire:
Enregistrer un commentaire