I use Ubuntu 16.04 (xenial) via WSL.
I copy this code
#!/bin/bash
read -p "Have you created db credentials already?" yn
case $yn in
[Yy]* ) break;;
[Nn]* ) exit;;
esac
When I paste it in Ubuntu I get only part of it:
read -p "Have you created db credentials already?" yn
Have you created db credentials already?
Why when it is pasted, it is pasted partially?
Update
I copy the code from GitHub, when the case
conditions are indented with tabs and when the code is without a line break in the last line (no extra empty note after the last line).
git
which is even more elegant: askubuntu.com/questions/992448/… but yes, indeed the usual way is to download a program with git and execute locally, it's just not something I want to do here.