Is there an HTTP client like wget/lynx/GET
that is distributed by default in POSIX or *nix operating systems that could be used for maximum portability?
I know most systems have wget
or lynx
installed, but I seem to remember installing some Ubuntu server systems using default settings and they had neither wget
or lynx
installed in the base package.
I am writing a shell script for Linux (and probably Mac) to install a piece of software onto the computer. To prevent having to distribute a couple of large files, I would like to fetch these files from the internet instead of packaging in with the installer. Currently, the install script is to be distributed in a single file created from Makeself.
I'd like to avoid having the install script be over 100 MB which it would be if the files were included, and also they may not be required if the person is upgrading or re-installing the software. Maybe the most portable thing to do is include the files in the pacakage.
Right now I am just thinking of having the script check for wget
, lynx
, and GET
, in that order and it will use whichever one it can for downloading, but I could avoid this altogether if there was a way I could download the files that would work on all systems.
EDIT:
Does anyone know much about lwp-request (GET
) and its availability? This seems to be readily available on several of the systems I have checked so far, and I remember this always being around 10+ years ago going back to RedHat.
curl
or (extreme example)netcat
(often aliased asnc
). However, I thinkwget
should be the most universally available. If this isn't available, chances are that all the others won't be as well – Insensatecurl
is a possibility too, I figured that one would be less common thanwget
though. I didn't think aboutnc
, so that could be a possibility too, I know its been around a long time. – Methodology/dev/tcp
thing. If you wanna add an answer aboutnc
and that bash trick, I will probably accept that. I'm starting to think that maybe I am over-analyzing this particular piece and could always just tell them to install one of those packages in the worst case. – Methodology