Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The method of querying words by using linux's look command

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Today, the editor shares with you the method of using linux's look command to query words. I believe many people don't know much about it. In order to make you understand better, I summed up the following contents and looked down together. I'm sure you'll get something.

The look instruction is used to query English words. You only need to give it the initial string it wants to query, and it will display all the words in the opening string that meet that condition.

Syntax format: look [parameter] [string] [file]

Common parameters:

-a uses another dictionary file, web2, which is also located in the / usr/dict directory-d only compares English letters and numbers, and the rest ignores-f ignores character case differences. -t set the suffix string

Reference exampl

Query the lines in the file file that begin with L:

[root@linuxcool ~] # cat file

LINUX!

Linux is a free unix-type opterating system.

This is a linux testfile!

Linux test

[root@linuxcool ~] # look L file

LINUX!

Linux is a free unix-type opterating system. On the use of linux's look command to query words to share here, I hope that the above content can have a certain reference value, you can learn to apply. If you like this article, you might as well share it for more people to see.

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report