#!/usr/bin/env bash # Copyright (c) 2017 Luke Shumaker # # This work is free. You can redistribute it and/or modify it under # the terms of the Do What The Fuck You Want To Public License, # Version 2, as published by Sam Hocevar. See the COPYING file for # more details. for arg in "$@"; do keydomain="${arg%%)*}" keypath="${arg#*)}" domain="$(IFS=,; printf '%s\n' $keydomain|tac|xargs|tr ' ' '.')" echo "$domain$keypath" done