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 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

©2019-2020 Toolsou All rights reserved,
Redis Underlying data structure A person who dissuades others from learning computer , Are not good people win10 System computer C Where's the disc ,c disc users where? (win10c Disk not found users) Freshman c Language student management system ( lower ) hospital WIFI Which family is strong ? utilize Python Script unlimited spoof girlfriend computer C language program design —— Student management system Byte runout - Test development practice - One side cool meridian python Run code at specified time 5 Best style Linux Server system recommendation Anti anxiety life after naked resignation , I believe everything will have the best arrangement