Question:
Grep command is used to:
Grep कमांड का उपयोग किसके लिए किया जाता है?
Options:
- change the case of alphabets
- search for a specific pattern from a specified file and display those lines containing the pattern
- cut the columns/fields of a specified file
- redirect the output of one command to another command
- वर्णमाला के केस (case) को बदलने के लिए
- एक निर्दिष्ट फ़ाइल से किसी विशिष्ट पैटर्न की खोज करने और उस पैटर्न वाली पंक्तियों को प्रदर्शित करने के लिए
- एक निर्दिष्ट फ़ाइल के कॉलम/फ़ील्ड को काटने (cut) के लिए
- एक कमांड के आउटपुट को दूसरे कमांड पर पुनर्निर्देशित (redirect) करने के लिए
Correct Answer: b)
Explanation:
`grep` (Global Regular Expression Print) is a command-line tool in Unix/Linux that searches through text files or standard input for lines matching a specified pattern or regular expression and prints the matching lines.
`grep` (ग्लोबल रेगुलर एक्सप्रेशन प्रिंट) यूनिक्स/लिनक्स का एक कमांड-लाइन टूल है जिसका उपयोग किसी निर्दिष्ट फ़ाइल में विशिष्ट पैटर्न (रेगुलर एक्सप्रेशन) को खोजने और उस पैटर्न वाली पंक्तियों को प्रदर्शित करने के लिए किया जाता है।