kkamagi's story

IT, 정보보안, 포렌식, 일상 공유

OS

특정문자가 들어간 행 출력

까마기 2014. 11. 25. 20:37
728x90
반응형

#cat Vulnerability_result.txt | awk '/root/{print}'


--> root 라는 문자열이 들어간 행 출력


--> 결과

[root@localhost Vulnerability_Assessment]# cat Vulnerability_result.txt | awk '/root/{print}'

awk '/1.01 START/,/1.01 END/' /root/ksidc/Vulnerability_Assessment/Vulnerability.txt

awk '/1.06 START/,/1.06 END/' /root/ksidc/Vulnerability_Assessment/Vulnerability.txt

awk '/1.08 START/,/1.08 END/' /root/ksidc/Vulnerability_Assessment/Vulnerability.txt

awk '/1.09 START/,/1.09 END/' /root/ksidc/Vulnerability_Assessment/Vulnerability.txt

awk '/1.12 START/,/1.12 END/' /root/ksidc/Vulnerability_Assessment/Vulnerability.txt

awk '/2.03 START/,/2.03 END/' /root/ksidc/Vulnerability_Assessment/Vulnerability.txt

awk '/3.04 START/,/3.04 END/' /root/ksidc/Vulnerability_Assessment/Vulnerability.txt

awk '/3.05 START/,/3.05 END/' /root/ksidc/Vulnerability_Assessment/Vulnerability.txt

awk '/3.13 START/,/3.13 END/' /root/ksidc/Vulnerability_Assessment/Vulnerability.txt

awk '/3.17 START/,/3.17 END/' /root/ksidc/Vulnerability_Assessment/Vulnerability.txt

awk '/4.01 START/,/4.01 END/' /root/ksidc/Vulnerability_Assessment/Vulnerability.txt

awk '/4.04 START/,/4.04 END/' /root/ksidc/Vulnerability_Assessment/Vulnerability.txt

awk '/5.05 START/,/5.05 END/' /root/ksidc/Vulnerability_Assessment/Vulnerability.txt

awk '/5.07 START/,/5.07 END/' /root/ksidc/Vulnerability_Assessment/Vulnerability.txt

awk '/6.01 START/,/6.01 END/' /root/ksidc/Vulnerability_Assessment/Vulnerability.txt

awk '/7.01 START/,/7.01 END/' /root/ksidc/Vulnerability_Assessment/Vulnerability.txt

awk '/7.02 START/,/7.02 END/' /root/ksidc/Vulnerability_Assessment/Vulnerability.txt

반응형

'OS' 카테고리의 다른 글

php-mssql 연동  (0) 2014.11.27
EXT3-fs error (device sda2) in start_transaction: Journal has aborted  (0) 2014.11.27
서버 트래픽 제한 설정 - ethtool  (0) 2014.11.24
mysql password 세팅 및 초기화  (0) 2014.11.17
bind 버전 확인  (0) 2014.11.15