![]() This command will print all lines that contain a word linux in all files in the current directory and sub-directories:įile3.txt:Ubuntu is a linux operating system To search for a string linux in all files in the current directory and sub-directories, run the following command: grep -r linux *.This command will print all lines that contain a word linux in file1.txt and file2.txt:įile1.txt:tecadmin is a popular linux blogįile2.txt:Linux is an open-source operating system.įile2.txt:linux is made by linus torvalds.įile2.txt:linux is most popular operating system. To search for a string linux in file file1.txt and file2.txt, run the following command: grep -i linux file1.txt file2.txt.To Search a Specific String in Multiple File This command will print all lines that contain a word tecadmin case insensitively: ![]() To search for a string tecadmin case insensitively in the file file1.txt, run the following command: grep -i tecadmin file1.txt.This command will print all lines that contain a whole word tecadmin: ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |