This article is part of the Linux Shell Series Tutorial (eight), more shell tutorials: Linux Shell Tutorials
In previous: Linux Shell series Tutorial (vii) Shell output This article has a brief introduction to the Shell printf command, which
The printf command is used to format the output and is an enhanced version of the echo command. It is a finite variant of the C-language printf () library function, and is somewhat different in syntax.Note: printf is defined by the POSIX standard,
The printf command is used to format the output and is an enhanced version of the echo command. It is a finite variant of the C-language printf () library function, and is somewhat different in syntax.Note: printf is defined by the POSIX standard,
The printf command is used to format the output and is an enhanced version of the echo command. It is a finite variant of the C-language printf () library function, and is somewhat different in syntax.Note: printf is defined by the POSIX standard,
The printf command mimics the printf () program in the C library.Standard, so scripting with printf is better than using echo portability.printf uses reference text or space-delimited parameters, which can be used outside of the format string in
in the previous section we learned about the Shell's echo command, which we'll learn from the Shell's other output command printf.
The printf command mimics the printf () program in the C library.
Standard, so scripting with printf is better than
Category: LINUXReference: http://sns.linuxpk.com/space-566-do-blog-id-15819.htmlprintf FORMAT [ARGUMENT] ...printf OPTIONfunctionFormat and print the data.For example* Print integers and strings:$printf ' The integer is:%d\nthe string is:%s\n ' 3
In the previous section we learned about the Shell's echo command, which we'll learn from the Shell's other output command printf.The printf command mimics the printf () program in the C library.printf is defined by the POSIX standard, so scripting
Shell learning: Shell echo, printf, test command, echotestShell learning: Shell echo, printf, test command Shell echo command
Show normal strings
echo "hello"
Output: hello
Double quotation marks can be omitted as follows:
echo hello
Output:
-------------------------------------------------------------------------------------------"Cut Command"Cut [Options] File-F Column Number (--field extract the first few columns)-D delimiter (--delimiter splits columns by specified delimiter)VI User.
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.