#!/bin/sh

# shortens a path given from stdin
# usage: ./shortpath <long_path_to_be_shorten>

awk -F '/' '{if(NF > 4){print "…/"$(NF-2)"/"$(NF-1)"/"$(NF)}else{print}}' < /dev/stdin
