From owner-svn-src-all@freebsd.org Thu Oct 29 18:52:08 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1560B45ADB6 for ; Thu, 29 Oct 2020 18:52:08 +0000 (UTC) (envelope-from xtouqh@icloud.com) Received: from st43p00im-ztfb10063301.me.com (st43p00im-ztfb10063301.me.com [17.58.63.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CMZLH2qb4z4CLp for ; Thu, 29 Oct 2020 18:52:07 +0000 (UTC) (envelope-from xtouqh@icloud.com) Received: from [192.168.1.6] (unknown [91.240.124.157]) by st43p00im-ztfb10063301.me.com (Postfix) with ESMTPSA id 33884A401D6; Thu, 29 Oct 2020 18:52:00 +0000 (UTC) Subject: Re: svn commit: r367141 - head/usr.bin/fetch To: =?UTF-8?Q?Fernando_Apestegu=c3=ada?= , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202010291834.09TIYlrb040546@repo.freebsd.org> From: xtouqh@icloud.com Message-ID: <023d1414-cc24-8c4b-fd11-02bd4d5ece40@icloud.com> Date: Thu, 29 Oct 2020 21:51:58 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: <202010291834.09TIYlrb040546@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.312, 18.0.737 definitions=2020-10-29_12:2020-10-29, 2020-10-29 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-2006250000 definitions=main-2010290129 X-Rspamd-Queue-Id: 4CMZLH2qb4z4CLp X-Spamd-Bar: ------- X-Spamd-Result: default: False [-7.72 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:17.58.0.0/16:c]; FREEMAIL_FROM(0.00)[icloud.com]; DKIM_TRACE(0.00)[icloud.com:+]; DMARC_POLICY_ALLOW(-0.50)[icloud.com,quarantine]; NEURAL_HAM_SHORT(-0.73)[-0.727]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[icloud.com]; ASN(0.00)[asn:714, ipnet:17.58.63.0/24, country:US]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.98)[-0.982]; R_DKIM_ALLOW(-0.20)[icloud.com:s=1a1hai]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_HAM_LONG(-1.01)[-1.007]; MIME_GOOD(-0.10)[text/plain]; DWL_DNSWL_LOW(-1.00)[icloud.com:dkim]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_NO_DN(0.00)[]; WHITELIST_SPF_DKIM(-3.00)[icloud.com:d:+,icloud.com:s:+]; RWL_MAILSPIKE_POSSIBLE(0.00)[17.58.63.179:from]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[svn-src-all] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Oct 2020 18:52:08 -0000 Fernando ApesteguĂ­a wrote: > Author: fernape (ports committer) > Date: Thu Oct 29 18:34:47 2020 > New Revision: 367141 > URL: https://svnweb.freebsd.org/changeset/base/367141 > > Log: > fetch(1): Add EXAMPLES section > > Add a few examples covering flags: 1, R, a, o, q, r, s, v > > Approved by: manpages (bcr@) > Differential Revision: https://reviews.freebsd.org/D26946 > > Modified: > head/usr.bin/fetch/fetch.1 > > Modified: head/usr.bin/fetch/fetch.1 > ============================================================================== > --- head/usr.bin/fetch/fetch.1 Thu Oct 29 18:29:22 2020 (r367140) > +++ head/usr.bin/fetch/fetch.1 Thu Oct 29 18:34:47 2020 (r367141) > @@ -30,7 +30,7 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd May 6, 2018 > +.Dd October 29, 2020 > .Dt FETCH 1 > .Os > .Sh NAME > @@ -384,6 +384,51 @@ If the > argument is used and the remote file is not newer than the > specified file then the command will still return success, > although no file is transferred. > +.Sh EXAMPLES > +Silently try to fetch the URLs passed as parameters. > +The first one will fail. > +If the second URL succeeds the third one will not be tried: > +.Bd -literal -offset indent > +$ fetch -1 -q https://www.freebsd.org/bad.html \\ > + ftp.freebsd.org/pub/FreeBSD/README.TXT \\ > + https://www.fake.url > +fetch: https://www.freebsd.org/bad.html: Not Found > +.Ed > +.Pp > +Be verbose when retrieving the > +.Ql README.TXT > +file: > +.Bd -literal -offset indent > +$ fetch -v ftp.freebsd.org/pub/FreeBSD/README.TXT > +resolving server address: ftp.freebsd.org:80 > +requesting http://ftp.freebsd.org/pub/FreeBSD/README.TXT > +local size / mtime: 4259 / 1431015519 > +remote size / mtime: 4259 / 1431015519 > +README.TXT 4259 B 44 MBps 00s > +.Ed > +.Pp > +Quietly save the > +.Ql README.TXT file as "file as" should be on separate line, otherwise it's treated as part of .Ql argument. BTW, why are we not using .Pa for these? > +.Ql myreadme.txt > +and do not delete the output file under any circumstances: > +.Bd -literal -offset indent > +fetch -o myreadme.txt -q -R ftp.freebsd.org/pub/FreeBSD/README.TXT > +.Ed > +.Pp > +Print the size of the requested file and identify the request with a custom user > +agent string: > +.Bd -literal -offset indent > +$ fetch -s ftp.freebsd.org/pub/FreeBSD/README.TXT > +--user-agent="Mozilla/5.0 (X11; FreeBSD x86_64; rv:78.0) Gecko/20100101" > +3513231 > +.Ed > +.Pp > +Restart the transfer of the > +.Ql README.TXT > +file and retry the transfer upon soft failures: > +.Bd -literal -offset indent > +$ fetch -a -r http://ftp.freebsd.org/pub/FreeBSD/README.TXT > +.Ed > .Sh SEE ALSO > .Xr fetch 3 , > .Xr phttpget 8