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