bsamuels@datamansys.co.uk writes:
Can I automate this process from within a script?
Yes, possibly, with .netrc and ftp, but why don't you tell us the actual problem you're trying to solve with this script and comparison and there's probably another solution out there.