0

What I have:

temp="$(cat /home/latest.log)"
old="$(cat /home/old_log.txt)"

I'd like to compare these two logs and what's new we wanna push in an new variable called proof.

proof="$(grep -Fxvf -e "$old" -e "$temp")"

What's wrong with the grep code or isn't it possible to do this job using grep? I pushed the variables in "" so the script should watch for the lines. We do not write it into files because the final code is an infinite loop and we want to go away from write accesses.

0 Answers0