Removing whitespaces - end and start (#171)

This commit is contained in:
Xert 2023-09-21 14:12:12 +02:00 committed by GitHub
parent bc72c2150c
commit f66088f486
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -42,7 +42,7 @@ makeConf() {
services.openssh.enable = true;
users.users.root.openssh.authorizedKeys.keys = [$(while read -r line; do
line=$(echo -n "$line" | sed 's/\r//g')
trimmed_line=$(echo -n "$line" | tr -d '[:space:]')
trimmed_line=$(echo -n "$line" | xargs)
echo -n "''$trimmed_line'' "
done <<< "$keys")];
}