Okay, so I have a file containing line after line of three digit numbers. I need a script that does an action based on the last two numbers in this list.
So.... To get the last two numbers, I can have the script do
tail -2 filename.txt
But where I run into trouble is as follows. If these last two numbers, retrieved via tail, are Greater than 400, I want to run a command. The command is irrelevant, so lets just make something up: touch filename.txt
If it helps, it doesnt necessarily have to do > 400. It would still meet my needs if it did something more like. If = 400 or 401 or 402 or 403 or 404 or 405 as there will really only be that number set, with nothing over 405.
So the script can function with whatever is easier.
Thanks a ton!