반응형 cat명령어1 터미널에서 파일 내용 검색 grep 명령어 사용방법(포함단어, 미포함단어, 다중 검색) 오늘은 grep 명령어의 활용 방법을 알아보려고 합니다. grep 명령어는 파일 내에서 원하는 패턴(단어)을 검색하는 데 사용됩니다. (예제에서 사용하는 cat 명령어는 파일의 내용을 출력하는 기본적인 명령어입니다.) 우선 검색 테스트를 위한 file.txt를 만들었습니다. file.txt 내용 This is an example file. It contains some sample text for demonstrating grep commands. These are the lines with "apple". These are the lines with "banana". Both "apple" and "banana" are fruits. 1. 특정 단어가 포함된 내용 검색 cat file.txt | gre.. 2023. 8. 3. 이전 1 다음 728x90 반응형