diff options
author | Florian Pritz <bluewind@xinu.at> | 2018-06-23 22:23:16 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2018-06-23 22:23:16 +0200 |
commit | ff08764db7d5396b7ebe7bf78ff9fa0a3c512f30 (patch) | |
tree | de3b6e230c53fd21dc528e2ab34046d83a2c8bde | |
parent | f0d01c040a56fe249802628e0e9e82fd5ac64149 (diff) | |
download | bin-ff08764db7d5396b7ebe7bf78ff9fa0a3c512f30.tar.gz bin-ff08764db7d5396b7ebe7bf78ff9fa0a3c512f30.tar.xz |
clipboard-singlify: Add doc and improve regex by using \h
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rwxr-xr-x | clipboard-singlify | 4 | ||||
-rwxr-xr-x | vpn-connect | 1 |
2 files changed, 4 insertions, 1 deletions
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 |