In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "how to output non-newline characters in linux". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "linux how to output non-newline characters"!
In linux, you can use the "- n" parameter of the echo command to output non-newline characters; the echo command is used for string output, and when the parameter is set to "- n", it cancels the newline symbol at the end of the line after the output, that is, the content does not wrap after the output, and the syntax is "echo-n output content".
This article operating environment: linux7.3 system, Dell G3 computer.
How does linux output non-newline characters
The function of the echo command is to display a piece of text on the monitor, which generally acts as a prompt. In addition, you can write what you want to write directly in the file.
The syntax is:
Echo [options] [output]
Two common options for the echo command:-n and-e
-n: indicates that there is no line wrap after the output.
-e: indicates that escaped characters are processed in a corresponding manner.
If you do not add-e, the escaped characters will be processed as ordinary characters on output, and will not achieve what you want to achieve. )
Examples are as follows:
Ordinary strings can be entered directly after echo, but there will be problems when you want to output certain characters such as\ (when written in this way,\ is filtered as a successor character, and to output a\ must be typed\, similar to the requirements of c language printf output), so it is generally best to use the format 'string or "string", so that even if it is\, it can be output, convenient and intuitive.
At this point, I believe you have a deeper understanding of "how to output non-newline characters in linux". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
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.