shell: add alias for hashed pw creation

This commit is contained in:
Marco Thomas
2023-06-22 17:42:38 +02:00
parent 213fa79a76
commit d11b19a56f

View File

@@ -44,7 +44,17 @@ alias condown='nmcli con down id'
alias conscan='nmcli dev wifi' alias conscan='nmcli dev wifi'
alias conedit='nm-connection-editor' alias conedit='nm-connection-editor'
# functions # password hash (sed needed when using in docker-compose)
pwhash() {
name=$1
if [ -z $name ]; then
echo "Please enter a username."
return
fi
echo $(htpasswd -nB ${name}) | sed -e s/\\$/\\$\\$/g
}
# ocr
ocr() { ocr() {
file=$1 file=$1
if [ -z $file ]; then if [ -z $file ]; then