first commit
This commit is contained in:
7
st-emailhandler
Executable file
7
st-emailhandler
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
input="$(sed 's/.*│//g' | tr -d '\n' | grep -oE '([[:alnum:]_.-]+@[[:alnum:]_.-]+?\.[[:alpha:].]{2,6})' "$@" | sort -u)"
|
||||
#This loop is required since it would otherwise read <mail>@subdomain.domain.tld as two email addresses (<mail>@subdomain.domain and <mail>@subdomain.domain.tld)
|
||||
emails="$(for str in $input; do
|
||||
[ "$(echo "$input" | grep -c "$str")" -eq 1 ] && echo "$str"
|
||||
done )"
|
||||
[ -n "$emails" ] && echo "$emails" | dmenu -i -p 'Copy which email?' -l 10 | tr -d '\n' | xclip -selection clipboard
|
||||
Reference in New Issue
Block a user