[bin] Strip www. from domains before generating gopass username

This commit is contained in:
Sebastian Schulze 2023-09-12 10:37:51 +02:00
parent 8e96c24c7a
commit 0eaa9eae1f
Signed by: bascht
GPG Key ID: 5BCB1D3B4D38A35A
1 changed files with 1 additions and 1 deletions

View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash
DOMAIN=$(echo ${1} | awk -F[/:] '{print $4}')
DOMAIN=$(echo ${1} | awk -F[/:] '{print $4}' | sed -E 's_^www\.__')
USER="${DOMAIN}@bascht.com"
notify-send "Copied username to clipboard" "${USER}"
echo "${USER}" | wl-copy