In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Today, what the editor shares with you is the use of linux line breaks. I believe many people do not know much about it. In order to let you know more about linux line breaks, I have summarized the following contents and let's move on. I'm sure you'll get something.
Carriage return newline character under linux system
Brief introduction
Carriage return newline characters are often used in reading and writing text files, which is a little more complicated under windows and easier under linux.
Describe in detail
Carriage return and line change are two different concepts.
Enter is to tell the computer to position the head on the left boundary, and to change the line is to move the head down one line.
In Windows: carriage return to the beginning of the line, and newline to the next line in the current position
In Unix system: it is not necessary to add two characters at the end of each line, so there is only a newline character at the end, that is,'\ n'.
In Mac systems: there is only a carriage return at the end of each line, that is,'\ r'.
To put it another way, if a newline character'\ n' is encountered in Linux, the carriage return + line feed operation will be performed, and the carriage return character will only be displayed as the control character'^ M', and no carriage return operation will occur. In Windows, carriage return + line feed will be required together, and the missing or incorrect line feed will not be a correct line feed.
It should be noted that in the qt program, write "\ n" on it, it can achieve the function of enter + line break in linux or windows. When opened in a text file, linux will only automatically change to 0x0d 0x0a.
Summary
The above is a brief introduction to the use of linux newline symbols, of course, the detailed use of the above differences have to be used by everyone to understand. If you want to know more, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.