Update README.md

This commit is contained in:
skyper
2024-09-01 18:34:59 +01:00
committed by GitHub
parent 27c3b095bd
commit c8c60d0a1a
+15 -4
View File
@@ -1195,10 +1195,9 @@ Using Python, download only:
```sh
# Declare a curl-alternative
purl() {
local p
local url="${1:?}"
{ [[ "${url:0:8}" == "https://" ]] || [[ "${url:0:7}" == "http://" ]]; } || url="https://${url}"
"$(which python3 || which python || which pyton2 || which false)" -c "\
local url="${1:?}"
{ [[ "${url:0:8}" == "https://" ]] || [[ "${url:0:7}" == "http://" ]]; } || url="https://${url}"
"$(which python3 || which python || which pyton2 || which false)" -c "\
import urllib.request
import sys
import ssl
@@ -1234,6 +1233,18 @@ surl() {
# surl ipinfo.io
```
using Perl, download only:
```sh
lurl() {
local url="${1:?}"
{ [[ "${url:0:8}" == "https://" ]] || [[ "${url:0:7}" == "http://" ]]; } || url="https://${url}"
perl -e 'use LWP::Simple qw(get);
my $url = '"'${1:?}'"';
print(get $url);'
}
# lurl ipinfo.io
```
Using bash, download only:
```sh
burl() {