简体   繁体   中英

Why is wget saving something when using parametrized url?

I am using following command in my bash script to trigger jenkins build:

wget --no-check-certificate "http://<jenkins_url>/view/some_view/job/some_prj/buildWithParameters?token=xxx"

Output:

HTTP request sent, awaiting response... 201 Created
Length: 0
Saving to: “buildWithParameters?token=xxx”

[ <=>                                                                                                                                                                       ] 0           --.-K/s   in 0s      

2015-02-20 10:10:46 (0.00 B/s) - “buildWithParameters?token=xxx” saved [0/0]

And then it's creates empty file: “buildWithParameters?token=xxx”

My question is: why wget creates this file and how to turn that functionality off?

Most simply:

wget --no-check-certificate -O /dev/null http://foo

this will make wget save the file to /dev/null , effectively discarding it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM