I want to write a script, that asks the user for an username.
I think so the script is written:
echo “Please enter your username”
username=
But how can I ask for the username?
I want to write a script, that asks the user for an username.
I think so the script is written:
echo “Please enter your username”
username=
But how can I ask for the username?
echo -n "Please enter your username "
read username
But how can I get it as variable?
echo -n "Please enter your username "
read username
echo "Welcome, $username"
Thanks.
Now it is working fine!
And all in one line (not only the commands, but also what the user sees):
read -p "Enter username: " USERNAME
Of course the username is now in ${USERNAME}.
Now I have another problem.
I want a link to /1&1 on the Desktop and I did it so:
ln -s /1&1/ ~/Desktop/1&1SmartDrive\ Verknüpfung
One time it is working but after a restart the filesystem mounted in /1&1 is not available (of course I remounted, too)
Int the /1&1 folder are just more links to the 1&1 link and so on.