Hello I'm having a little difficulty in writing a shell script for a few simple tasks.
First I have two files "file1.txt" and "file2.txt" and I want to read and compare the last line of each file. The files look like this.
File1.txt
File2.txt
After comparing the two lines I would like the code to output which line has the higher number. Then depending on which file is outputted I would like to have the script download a file from a URL.
I figured out how to download a file from a URL but I couldn't figure out how to compare two lines and have them output to a variable that would then be used to determine what file to download. Thanks for listening to my ramblings. Any and all help is appreciated.