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?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
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.