#!/usr/bin/env sh usage () { echo "Usage: $(basename "${0}") []" echo "Plays a stream from twitch.tv in a local video player." exit 1 } if [ -z "${1}" ]; then usage fi username="${1}" resolution="${2:-"best"}" streamlink "https://twitch.tv/${username}" "${resolution}"