ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

You need to search for the string “Tecmint” in all the “.txt” files in the current directory. How will you do it?

user-image
تم إضافة السؤال من قبل mahmoud elnahhas , Assistant Manager , National Bank of Kuwait (NBK Egypt)
تاريخ النشر: 2014/05/21
Akash Dubey
من قبل Akash Dubey , Senior Technical Lead , Fulcrum Software Worldwide Pvt. Ltd.

above command won't tell which file(s)  has the word Techmint, i think more appropriate is to use grep  -n Techmint  *.txt

Muhammad Anzar
من قبل Muhammad Anzar , DevOps/DevSecOps Architect , Confidential

grep -i "Tecmint" *

 

This will show the files if it is contained any of the file

Vijai Ganapathy
من قبل Vijai Ganapathy , IT Architect , Hewlett-Packard Enterprise

 

$ grep -i "Techmint" *.txt, would to that for both the cases, with content and files. 

$ grep -l Techmint *.txt , would list the files containing the string. 

 

المزيد من الأسئلة المماثلة

هل تحتاج لمساعدة في كتابة سيرة ذاتية تحتوي على الكلمات الدلالية التي يبحث عنها أصحاب العمل؟