Joke Collection Website - Blessing messages - Script reads short message content

Script reads short message content

In a Shell script, the command used to read the contents of each field in the file and assign it to a shell variable is:

Read -p "Enter a val:" val echo $ val.

Read- reads the value from the standard input. This read internal command is used to read a single line of data from standard input. This command can be used to read keyboard input, and when redirection is used, read a line of data in a file.

meaning

Shell scripts are like. Bat in early dos era. Its simplest function is to write many instructions together so that users can easily execute multiple commands in one operation. Shell scripts also provide important functions such as array, loop, condition and logical judgment, so that users can write programs directly in the shell without using the syntax of traditional programming like C programming language.