One ,printf command

1. function

* Used to format data
2. Command format

* printf   ' Print format '    Actual content
Introduction to relevant formats

* \a: Output of warning sound
* \b: Backspace key
* \f: Clear screen
* \n: Wrap
* \r: enter key
* \t: Horizontal tab key
* \v: Vertical tab key
* \xNN:NN Is a number , Can convert hexadecimal numbers to characters
Related variable format

* %ns:n Is a number ,s Bit string . How many characters to output
* %ni:n Is a number ,i Is an integer . How many bit integer to output
* %N.nf:N,n It's all numbers .f Floating point .N Is the integer part number of digits ,n Is the number of decimal places ( decimal point . That's all )
3. Demo case

* Case 1 : Will be hexadecimal 45 Convert to ASCII Corresponding characters in the table

* Case 2 : For example, I don't have a file student.txt, The content of the document is . We want to use this document printf Print to screen

* ① We use %s\t Printing , But because English letters and numbers are not equal , It will cause the phenomenon of irregular sorting

* ② We use placeholders to sort the printed information ( Because the first line has English letters ,%i Warning will be given corresponding to letters , So remove Name That line )

Two ,pr command

1. function

* File print setup command
2. Command format

* pr  [ option ]  file name
3. Demo case

* pr   /etc/manpath.config
The top line , When printing documents , System displayed : time , file name , Page

Technology
©2019-2020 Toolsou All rights reserved,
Bigtable Paper notes be based on springboot File upload for python Hundred lines of effective code to achieve Hanoi Tower Games ( Minimalist version )2019 Ladder race Lucky lottery (15 branch ) MySQL8.0MGR Single owner / Multi master installation and switching Java Function and use of reflection python Painting love A masterpiece to be handed down !Alibaba Interior products Redis In depth notes and source code data structure C Parking management of language JAVA Interview questions - Find the longest string that does not repeat ( Personal approach )