Date: Fri, 30 Oct 2020 12:54:11 +0100 From: =?UTF-8?Q?Fernando_Apestegu=C3=ADa?= <fernape@freebsd.org> To: xtouqh@icloud.com Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r367141 - head/usr.bin/fetch Message-ID: <CAGwOe2b2XcCexiwhgDBqFv81Ld%2BXcADPqy45Eh0=Jv=5wKKzPA@mail.gmail.com> In-Reply-To: <023d1414-cc24-8c4b-fd11-02bd4d5ece40@icloud.com> References: <202010291834.09TIYlrb040546@repo.freebsd.org> <023d1414-cc24-8c4b-fd11-02bd4d5ece40@icloud.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Oct 29, 2020 at 7:52 PM <xtouqh@icloud.com> wrote: > Fernando Apestegu=C3=ADa 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/D2694= 6 > > > > Modified: > > head/usr.bin/fetch/fetch.1 > > > > Modified: head/usr.bin/fetch/fetch.1 > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > > --- 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? > Thanks for catching this. It should be fixed by now. Cheers. > > > +.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=3D"Mozilla/5.0 (X11; FreeBSD x86_64; rv:78.0) Gecko/20100= 101" > > +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 > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGwOe2b2XcCexiwhgDBqFv81Ld%2BXcADPqy45Eh0=Jv=5wKKzPA>