Linux Learning basic Practice--echo/printf usage

Source: Internet
Author: User
Tags builtin

1. is echo an internal command or an external command? What is its role? How do i show "The Year is 2016.Today is 10yue 26" for two lines?


With the type command, ECHO is an internal command:

[[Email protected] ~]# type echo

Echo is a shell builtin

echo function: Displays the input content directly.

Echo-e "The year is 2016. \ n today is 7. "

[Email protected] ~]# ECHO-E "The year is 2016. \ntoday is 7. "

The year is 2016.

Today is 7.


2. is printf an internal command or an external command? What is its role? How do i show "The Year is 2016.Today is 10yue 26" for two lines?

With the type command, printf is an internal command:

[[Email protected] ~]# type printf

printf is a shell builtin

printf role: Format and display the input content.

printf "The year is 2016. \ n today is 7. "

[Email protected] ~]# printf "The year was 2016.Today is 7.\n"

The year was 2016.Today is 7.

[Email protected] ~]#


3. Use and usage of File command

Man file determine filename type OK

Eg:file/bin/ls

File absolute Path








This article is from the "Learn Linux history" blog, please be sure to keep this source http://woyaoxuelinux.blog.51cto.com/5663865/1859079

Linux Learning basic Practice--echo/printf usage

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.