Shell echo command and shellecho command

Source: Internet
Author: User
Tags echo command

Shell echo command and shellecho command
Display the variable read command to read a line from the standard input, and specify the value of each field in the input line to the shell variable

#! /Bin/shread name echo "$ name It is a test"
The above code is saved as test. sh. name receives the standard input variable and the result is:
[Root @ www ~] # Sh test. shOK # standard input OK It is a test # output
Display line feed
Echo-e "OK! \ N "#-e enable escape echo" It it a test"
Output result:
OK! It it a test
Show do not wrap
#! /Bin/shecho-e "OK! \ C "#-e enable escape \ c do not wrap echo" It is a test"
Output result:
OK! It is a test
Display command execution results
Echo 'date'
Note: here we use reverse quotation marks instead of single quotation marks '. The result shows the current date.
Tuesday, August 08, 2017 21:08:23 CST

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.