It has been more than a week since I started to learn Linux, and I have made a lot of edits to shell scripts. Many scripts contain various commands that prompt the user to read and display the command echo.
Many people simply abbreviated the subjects to be changed,
For example, the following message is displayed: Enter 1 ~ Any number of 255
Echo "Enter anumber between 1 to 255 :"
In this way, it is displayed
[Root @ Linux ~] # Entera number between 1 to 255:
Such a language is true, and its meaning is very clear. However, you may have thought that when a user executes such a command, he may have previously executed many things, and the entire Black command line contains a whole piece of letters and numbers. At this time, when the user runs this script, there is only one more line of English letters. Do users get tired when reading English letters every day? Will it be eye-catching?
This is the user experience!
To consider the user experience, our programmers can actually make the boring command line a little more beautiful.
Let's take the previous example as an example. If it is written:
Echo "================================"
Echo "# Enter anumber between 1 to 255 :#"
Echo "================================"
In this way, when displayed on the screen, the display effect will be significantly different from the previous one, and the user will be able to see it again! In the vast lines of command lines, it gives the user a strong feeling. Let the user see at a glance what I am running, what I want to do, what the program prompts are.
Here is another example.
ECHO can be used to display colors, for example, so that we can make color judgments on many important prompts. You can see:
# Enter the eth0 or eth1 to edit, others out:
As shown above and below, What do you think makes users better understand what to choose?
# Enter the eth0 or eth1 to edit, others out:
This is for the user experience.
We usually do a lot of things. In addition to being eye-catching and red, we can also use menus to show users the content they should have: for example, let's look at it again:
Prompt the user to enter relevant content to change the attributes of bootproto In the NIC:
If:
# Input DHCP | BOOTP | static | none to modify itsproperties:
Although the description is clear, see the following:
==== Select theitems you want to modify ====
1. DHCP 2. BOOTP 3. Static 4. None
-------------------------------------------------------------
Is this clearer?
This is the user experience. All thoughts for the sake of the user will make you go further and further on the road to the future, and make the user more fond of your program!