aboutsummaryrefslogtreecommitdiff
path: root/scripts/hedgedoc-ldap_to_oauth2/ldap_users.sh
blob: 0de3ce249cc037efa93463965ac955eb10dc860c (plain) (blame)
1
2
3
4
5
6
7
8
#!/bin/bash

while read -r p; do
  USER=$(echo "$p" | sed 's/\s.*$//')
  ID=$(echo "$p" | sed 's/.* //')
  echo "$USER" "$ID"
  sed "s/\$UID/$USER/g" replacements.txt | sed "s/\$LDAPID/$ID/g" - >>replacements.sql
done <ldap_users.txt