I am writing script that executes a program, saves it output into a text file, reads that file, and then sends it line by line to a web service.
Is it a good idea to use curl for that, or should I use maybe cat?
Text files are... just text files...
If you're creating the file on the same machine as your Web server, then just create the file in it's exact location, inside your Web server file directory hierarchy.
If it's a different machine, then just copy the file into place using sftp or rsync or scp, however you normally copy files between machines.
I think i have a solution. I will ssh terminal output to second machine and be saved as txt and on second machine I will have a script that will read.