Last active
December 21, 2021 17:04
-
-
Save swipswaps/2b366eb07168e0ec620ee6ea6b225cbe to your computer and use it in GitHub Desktop.
clipboard substitution of forward slash characters to underscore using xsel or xclip
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//xsel or xclip awk clipboard substitution of forward slash characters | |
//Copyright ©2021 by @swipswaps, All rights reserved. | |
//https://gist.github.com/swipswaps/2b366eb07168e0ec620ee6ea6b225cbe | |
//clipboard substitution of forward slash characters to underscore using xsel | |
#echo $(xsel -ob) |awk '{gsub(/\//,"_",$0)}1' |xsel -ib && xsel -ob | |
//clipboard substitution of forward slash characters to underscore using xclip | |
#echo $(xclip -o -selection clipboard) |awk '{gsub(/\//,"_",$0)}1' |xclip -selection c && echo $(xclip -o -selection clipboard) | |
//clipboard https:// removal & substitution of forward slash characters to underscore using xclip | |
#echo $(xclip -o -selection clipboard) |awk '{gsub(/https:\/\//,"",$0)}1' |awk '{gsub(/\//,"_",$0)}1' |xclip -selection c && echo $(xclip -o -selection clipboard) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment