Home

Awesome

urlp Build Status

A simple command-line utility for parsing URLs. No more awk/sed/grep incantations. Does One Thing Well.

Implemented in Rust, using Servo's URL parser.

$ urlp --host http://www.google.com
google.com
$ echo http://www.google.com | urlp --host
www.google.com
$ echo http://localhost:4567 | urlp --port
4567

Installation

urlp is available for Linux and OS X, 64-bit only for now:

curl -L https://github.com/clayallsopp/urlp/releases/download/1.0.0/urlp-`uname -s`-x86_64 > /usr/local/bin/urlp; chmod +x /usr/local/bin/urlp

If you want to install from the source, checkout the repo and run make install.

Usage

$ urlp --help
Usage: urlp OPTION URL

Options:
    --host                  Hostname
    --port                  Port
    --protocol, --scheme    Protocol
    --password              Password
    --username              Username
    --path                  Path
    --fragment              Fragment
    --query                 Query string