The method of querying words by using linux's look command
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.