How can I keep curl output out of mail from my cronjob?

Posted by Russell C. on Stack Overflow See other posts from Stack Overflow or by Russell C.
Published on 2010-04-23T14:35:36Z Indexed on 2010/04/23 20:33 UTC
Read the original article Hit count: 195

Filed under:
|

I have written a Perl script that runs as a daily crontab job that uploads files to Amazon S3 via CURL. I want the output of the cron job emailed to me which works fine but I don't want that email to include messages related to the CURL upload (only those message my script is outputting). Here are the CURL related messages I'm seeing in the daily email right now:

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0  230M    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0  230M    0     0    0  544k      0  1519k  0:02:35 --:--:--  0:02:35 1807k
  0  230M    0     0    0 1744k      0  1286k  0:03:03  0:00:01  0:03:02 1342k
  1  230M    0     0    1 2880k      0  1219k  0:03:13  0:00:02  0:03:11 1250k
  1  230M    0     0    1 4016k      0  1198k  0:03:17  0:00:03  0:03:14 1218k
  2  230M    0     0    2 5168k      0  1186k  0:03:19  0:00:04  0:03:15 1202k
  2  230M    0     0    2 6336k      0  1181k  0:03:19  0:00:05  0:03:14 1157k
  3  230M    0     0    3 7488k      0  1177k  0:03:20  0:00:06  0:03:14 1147k
  3  230M    0     0    3 8592k      0  1167k  0:03:22  0:00:07  0:03:15 1142k
  4  230M    0     0    4 9744k      0  1166k  0:03:22  0:00:08  0:03:14 1145k
  4  230M    0     0    4 10.6M      0  1163k  0:03:23  0:00:09  0:03:14 1142k
  5  230M    0     0    5 11.7M      0  1161k  0:03:23  0:00:10  0:03:13 1140k
  5  230M    0     0    5 12.8M      0  1158k  0:03:23  0:00:11  0:03:12 1133k
  6  230M    0     0    6 13.9M      0  1155k  0:03:24  0:00:12  0:03:12 1138k
  6  230M    0     0    6 15.0M      0  1155k  0:03:24  0:00:13  0:03:11 1138k
  7  230M    0     0    7 16.1M      0  1152k  0:03:25  0:00:14  0:03:11 1131k
  7  230M    0     0    7 17.2M      0  1152k  0:03:25  0:00:15  0:03:10 1132k
  7  230M    0     0    7 18.4M      0  1152k  0:03:24  0:00:16  0:03:08 1140k

I am using a simple Perl system() call to invoke CURL. Does anyone know what command line argument I can supply CURL to turn off the reporting of the upload progress?

© Stack Overflow or respective owner

Related posts about curl

Related posts about cron