repos/scripts

Simple scripts that I made for my personal computer to map keys, make bluetooth work, brightness keys, etc.
Commits Files Refs README LICENSE
shortpath (6 lines)
   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