Home >System Tutorial >LINUX >Learn how to use echo and redirection in LINUX

Learn how to use echo and redirection in LINUX

WBOY
WBOYforward
2024-01-09 14:38:13426browse

Today we will introduce in detail the basic knowledge of using LINUX echo and redirection. For a very simple basic tutorial, please see the detailed tutorial below.

1. Open LINUX and choose UBUNTU operating system.

Learn how to use echo and redirection in LINUX

Learn how to use echo and redirection in LINUX

2. Enter hello after echo, and after pressing Enter, hello will be displayed, and whatever is entered will be output.

Learn how to use echo and redirection in LINUX

3. Of course, when we enter a sentence, the outputhyphen will be displayed.

Learn how to use echo and redirection in LINUX

4. If we use >, we can input the content into a new file.

Learn how to use echo and redirection in LINUX

5. If has no spaces , this format is also possible, but it is not convenient for viewing.

Learn how to use echo and redirection in LINUX

6. You can define a suffix, but be careful when writing with a suffix. You need to be more careful.

Learn how to use echo and redirection in LINUX

7, The contents of the directory list can be output to a new file.

Learn how to use echo and redirection in LINUX

8. If uses >>, the content will not be overwritten, but the content will be added at the end.

Learn how to use echo and redirection in LINUX

The contents of

9 and tree can also be entered into the text.

Learn how to use echo and redirection in LINUX

The above is the detailed content of Learn how to use echo and redirection in LINUX. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:jb51.net. If there is any infringement, please contact admin@php.cn delete