i trying to drop last new lines(if exists) of dmesg to a file. I want to echo it if there is new lines that file. There isn't much of it, but i have something like this:
flog=$DIR/dmlog
dm=$(dmesg > $flog)
lines=$(wc -l $flog) <--- for example there is 60 lines
I need to check if number of lines is greater than previouse one (60).