trurl(1) 0.16.1 trurl(1) (NAME) trurl - (URL) (SYNOPSIS) trurl [ / URLs] (DESCRIPTION) trurl (URL) . URL RFC 3986 libcurl <<>> . URL <<>> (hierarchical) (scheme) :// . URL . trurl URL URL (component) . trurl : scheme user password options host port path query fragment zoneid. (NORMALIZATION) URL trurl <<>> . URL (URL decode) (URL encode) URL . : $ trurl 'http://ex%61mple:80/%62ath/a/../b?%2e%FF#tes%74' http://example/bath/b?.%ff#test (OPTIONS) . . URL --url . (--) URL . --flag argument --flag=argument . -a, --append [component]=[data] . path query . path URL (/) . query URL (&) . (=) URL . --accept-space trurl (space) URL URL . RFC 3986 URL . URL . --as-idn punycode (IDN) (Unicode) . punycode . --curl (schemes) libcurl . --default-port trurl . trurl libcurl . trurl --get --json --keep-port . -f, --url-file [filename] . - ( ) trurl (stdin) . URL . trurl carriage return ( ) . . (stderr) . -g, --get [format] URL . URL {component} [component] . . ( ): url scheme user password options host port path query fragment zoneid. {component} ( ). (URL decoded) . URL . --quiet . trurl : url: {url:path} (URL encoded) . url: : {:path}. strict: {strict:path} URL . URL trurl . must: {must:query} URL trurl . . default: {default:url} {default:port} URL . puny: {puny:url} {puny:host} punycode . idn: . idn: {idn:url} {idn:host} (IDN) ( punycode ). puny: . --default-port default: --punycode puny: . {url} --keep-port . IPv6 [fe80::20c:29ff:fe9c:409b]. IPv4 . {query:key} (query) . . URL %00 . . {query-all:key} . key . format (backslash) : \ - (backslash) \t - (tab) \n - (newline) \r - (carriage return) \{ - \[ - . -h, --help . --iterate [component]=[item1 item2 ...] . --iterate . . : $ trurl example.com --iterate=scheme="ftp https" --iterate=port="22 80" ftp://example.com:22/ ftp://example.com:80/ https://example.com:22 https://example.com:80 URL JSON . URL parts . . URL (URL decoded) . --urlencode . --keep-port trurl (port) URL (scheme) URL . trurl . : $ trurl https://example.com:443 --keep-port https://example.com:443 --no-guess-scheme (scheme) libcurl' . URL URL . : $ trurl example.com --no-guess-scheme trurl note: Bad scheme [example.com] --punycode punycode (hostname) (IDN) ASCII . IDN ASCII . : $ trurl http://aao --punycode http://xn--4cab6c --qtrim [what] (query) . what / ( (*)) trurl query . (wildcard) ( escape ) \*. --query-separator [what] query . & ; : . URL trurl query . : $ trurl "https://curl.se?b=name:a=age" --sort-query --query-separator ":" https://curl.se/?a=age:b=name --quiet ( ) . --redirect [URL] (redirect) URL . URL URL . : $ trurl --url https://curl.se/we/are.html --redirect ../here.html https://curl.se/here.html --replace [data] query URL . data / foo=bar . replace queries trurl . trurl = URL (URL encode) . --replace-append [data] --replace query query trurl (append) . -s, --set [component][:]=[data] URL. ("") URL . : url scheme user password options host port path query fragment zoneid. = URL (URL encoded) . := URL encode . ?= . . : ? ?:= . URL --url-file trurl --set URL . . --sort-query "variable=content" query . URL query . --trim [component]=[what] : --qtrim . . query . what ( (*)) trurl query . (wildcard) \*. --url [URL] URL . URL (scheme) URL trurl scheme ( --no-guess-scheme ). URL trurl URL . URL trurl URL - --verify . --urlencode --get --json (URL encoded) . -v, --version . --verify URL URL . trurl URL ..SH " URL (URL COMPONENTS)" scheme URL <<://>> . URL-encoded . URL scheme --no-guess-scheme trurl scheme . : $ trurl https://odd -g '{scheme}' https $ trurl odd -g '{scheme}' http $ trurl odd -g '{scheme}' --no-guess-scheme trurl note: Bad scheme [odd] user scheme (username) . (:) . (@) URL . : $ trurl https://user%3a%40:secret@odd -g '{user}' user:@ password (;) (options) . trurl URL (scheme) IMAP . : $ trurl https://user:secr%65t@odd -g '{password}' secret options (@) hostname . $ trurl 'imap://user:pwd;giraffe@odd' -g '{options}' giraffe (scheme) IMAP giraffe : $ trurl 'sftp://user:pwd;giraffe@odd' -g '{password}' pwd;giraffe ; : @ URL %-encode . host host (hostname) IP . hostname (IDN) ASCII . hostname URL ( URL-encoded) . trurl hostname IDN IDN punycode . IDN punycode : $ trurl http://aao --punycode http://xn--4cab6c hostname punycode IDN : $ trurl http://xn--4cab6c --as-idn http://aao hostname URL ([) IPv6 (]) . trurl IPv6 () . : $ trurl 'http://[2001:9b1:0:0:0:0:7b97:364b]' http://[2001:9b1::7b97:364b] IPv4 (decimal) (octal) (hexadecimal) . trurl . : $ trurl http://646464646 http://38.136.68.134 $ trurl http://246.646 http://246.0.2.134 $ trurl http://246.46.646 http://246.46.2.134 $ trurl http://0x14.0xb3022 http://20.11.48.34 zoneid IPv6 zoneid (network interface) . : $ trurl 'http://[2001:9b1::f358:1ba4:7b97:364b%enp3s0]' -g '{zoneid}' enp3s0 port (:) (port) . URL-encoded . trurl URL URL URL . --default-port URL . : $ trurl http:/a --default-port http://a:80 trurl . : $ trurl http:/a:80 http://a --keep-port trurl . : $ trurl http:/a:80 --keep-port http://a:80 path (path) URL (/) URL . : $ trurl http://xn--4cab6c -g '[path]' / trurl :.nf $ trurl http://hello -s path="pony" http://hello/pony $ trurl http://hello -s path="/pony" http://hello/pony - (..) - (./) . : $ trurl http://hej/one/../two/../three/./four http://hej/three/four --append : $ trurl http://twelve/three?hello --append path=four http://twelve/three/four?hello query (query) trurl (?) . : $ trurl http://horse?elephant -g '{query}' elephant query : $ trurl http://horse?elephant -s "query=?elephant" http://horse/?%3felephant query name=value (&) trurl . URL --append: $ trurl http://host?name=hello --append query=search=life http://host/?name=hello&search=life --replace : $ trurl 'http://alpha?one=real&two=fake' --replace two=alsoreal http://alpha/?one=real&two=alsoreal URL : $ trurl 'http://alpha?one=real&two=fake' --replace-append three=alsoreal http://alpha/?one=real&two=fake&three=alsoreal URL query : $ trurl "http://alpha/?one=real&two=fake&three=alsoreal" --sort-query http://alpha/?one=real&three=alsoreal&two=fake / URL (wildcard) --qtrim: $ trurl 'https://example.com?a12=hej&a23=moo&b12=foo' --qtrim a*' https://example.com/?b12=foo fragment (fragment) trurl (#) . : $ trurl http://horse#elephant -g '{fragment}' elephant fragment : $ trurl "http://horse#elephant" -s "fragment=#zebra" http://horse/#%23zebra fragment URL . URL . url trurl url --get <<>> URL . : $ trurl ftps://example.com:2021/p%61th -g '{url}' ftps://example.com:2021/path --json JSON URL. JSON URL / . URL . url . URL . --default-port --keep-port --punycode . parts URL . URL . URL --urlencode . parts.scheme (scheme) URL. parts.user . parts.password . parts.options . URL <> . parts.host . IDN UTF-8 . IPv4 IPv6 . IPv6 ([) - . --punycode punycode . parts.port . URL --default-port . parts.path . parts.query (query) . parts.fragment (fragment) . parts.zoneid (zone id) IPv6 . host IPv6 . params / . <> <> . / (&) - --query-separator - . --sort-query . URL . (EXAMPLES) URL $ trurl --url https://curl.se --set host=example.com https://example.com URL $ trurl --set host=example.com --set scheme=ftp ftp://example.com/ URL $ trurl --url https://curl.se/we/are.html --redirect here.html https://curl.se/we/here.html trurl - (..) $ trurl --url https://curl.se/we/../are.html --set port=8080 https://curl.se:8080/are.html URL $ trurl --url https://curl.se/we/are.html --get '{path}' /we/are.html URL URL . $ trurl --url https://curl.se/we/are.html --get '{default:port}' 443 URL $ trurl --url https://curl.se/hello --append path=you https://curl.se/hello/you URL $ trurl --url "https://curl.se?name=hello" --append query=search=string https://curl.se/?name=hello&search=string URL stdin $ cat urllist.txt | trurl --url-file - ... JSON $ trurl "https://fake.host/search?q=answers&user=me#frag" --json [ { "url": "https://fake.host/search?q=answers&user=me#frag", "parts": [ "scheme": "https", "host": "fake.host", "path": "/search", "query": "q=answers&user=me" "fragment": "frag", ], "params": [ { "key": "q", "value": "answers" }, { "key": "user", "value": "me" } ] } ] $ trurl "https://curl.se?search=hey&utm_source=tracker" --qtrim "utm_*" https://curl.se/?search=hey $ trurl "https://example.com?a=home&here=now&thisthen" -g '{query:a}' home / $ trurl "https://example.com?b=a&c=b&a=c" --sort-query https://example.com?a=c&b=a&c=b $ trurl "https://curl.se?search=fool;page=5" --qtrim "search" --query-separator ";" https://curl.se?page=5 URL $ trurl "https://curl.se/this has space/index.html" --accept-space https://curl.se/this%20has%20space/index.html URL $ trurl "https://curl.se/path/index.html" --iterate "scheme=http ftp sftp" http://curl.se/path/index.html ftp://curl.se/path/index.html sftp://curl.se/path/index.html trurl . 1 --url-file 2 --append 3 4 . 5 --set 6 7 URL 8 --qtrim 9 --verify URL . 10 --get 11 --iterate 12 --replace --replace-append (WWW) https://curl.se/trurl (SEE ALSO) curl(1), wcurl(1) trurl 2025-05-12 trurl(1)