Shell echo Command

Source: Internet
Author: User
Tags echo command

Show VariablesThe read command reads a row from the standard input and assigns the value of each field in the input row to the shell variable
#!/bin/shread name echo "$name It is a test"
The above code is saved as test.sh,name to receive the standard input variables, the result will be:
[[email protected] ~]# SH Test.shok # Standard input OK It is a test # output
Show line breaks
Echo-e "ok! \ n "#-E Open escape echo" It it a test "
Output Result:
ok! It it a test
Show No Line breaks
#!/bin/shecho-e "ok! \c "#-E Open escape \c No Line echo" It is a test "
Output Result:
ok! It is a test
Show command execution results
Echo ' Date '
Note: The use of anti-quotes ' instead of single quotes is used here. The result will show the current date
August 08, 2017 Tuesday 21:08:23 CST

Shell echo Command

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.