#!/bin/bash function short() { sed -r 's|/[^/]+-(.*)$|/\1|' } if [[ $# -eq 0 ]]; then short else echo "$1" | short fi