1 #!/bin/sh 2 3 # shortens a path given from stdin 4 # usage: ./shortpath <long_path_to_be_shorten> 5 6 awk -F '/' '{if(NF > 3){print "…/"$(NF-2)"/"$(NF-1)"/"$(NF)}else{print}}' < /dev/stdin
![]() | repos/scriptsSimple scripts that I made for my personal computer to map keys, make bluetooth work, brightness keys, etc. |