DamionGans / ubuntu-wsl2-systemd-script

[Does not work anymore!] Script to enable systemd support on current Ubuntu WSL2 images
1.56k stars 383 forks source link

Put spaces between multiple ENV=VAR for login command #13

Closed hnakamur closed 4 years ago

hnakamur commented 4 years ago

Without this fix (actually no newline at the end)

$ echo -n -e 'ENV1="VAR1"\nENV2="VAR2"\n' | xargs printf '%q'
'ENV1=VAR1''ENV2=VAR2'

With this fix (actually no newline at the end)

$ echo -n -e 'ENV1="VAR1"\nENV2="VAR2"\n' | xargs printf ' %q'
 'ENV1=VAR1' 'ENV2=VAR2'
DamionGans commented 4 years ago

Nice one, thanks a lot for this contribution! 🙃