rexturl

A versatile command-line tool for parsing and manipulating URLs.

Usage

Usage: rexturl [OPTIONS] [URLS...]

If no URLs are provided, rexturl will read from stdin.

Options

OptionDescription
--urls <URLS>Input URLs to process
--schemeExtract and display the URL scheme
--usernameExtract and display the username from the URL
--hostExtract and display the hostname
--portExtract and display the port number
--pathExtract and display the URL path
--queryExtract and display the query string
--fragmentExtract and display the URL fragment
--sortSort the output
--uniqueRemove duplicate entries from the output
--jsonOutput results in JSON format
--allDisplay all URL components
--customEnable custom output mode
--format <FORMAT>Custom output format [default: {scheme}://{host}{path}]
‘—domain’Extract and display the domain

Custom Output Format

When using --custom and --format, you can use the following placeholders:

  • {scheme}
  • {username}
  • {host}
  • {domain}
  • {port}
  • {path}
  • {query}
  • {fragment}