From ff08764db7d5396b7ebe7bf78ff9fa0a3c512f30 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sat, 23 Jun 2018 22:23:16 +0200 Subject: clipboard-singlify: Add doc and improve regex by using \h Signed-off-by: Florian Pritz --- clipboard-singlify | 4 +++- vpn-connect | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/clipboard-singlify b/clipboard-singlify index 75d09e0..aa2dcb1 100755 --- a/clipboard-singlify +++ b/clipboard-singlify @@ -1,3 +1,5 @@ #!/bin/bash -xclip -o | perl -pe 'BEGIN{undef $/;} s#[\t ]*\n[\t ]*# #mg; s#^\s*##; s#\s*$##' | xclip +# Remove linebreaks and indentation in clipboard content. This makes the content safe to paste in e.g. a chat window + +xclip -o | perl -pe 'BEGIN{undef $/;} s#\h*\n\h*# #mg; s#^\s*##; s#\s*$##' | xclip diff --git a/vpn-connect b/vpn-connect index 8f9ea4a..a569486 100755 --- a/vpn-connect +++ b/vpn-connect @@ -15,6 +15,7 @@ done hostnames=(ieeexplore.ieee.org dl.acm.org proquest.tech.safaribooksonline.de +link.springer.com ) for ip in $(dig +short "${hostnames[@]}"); do sudo ip route add dev vpntun0 "$ip" || true -- cgit v1.2.3-24-g4f1b