오늘은 대한입니다.
sun's longitude:299 44 14.54 
· 자유게시판 · 묻고답하기 · 알파문서 · RPMS list
· 사용자문서 · 팁/FAQ모음 · 리눅스Links · 자료실
· 서버정보 · 운영자 · Books/FAQ · FreeBSD
/board/read.php:소스보기  
알파문서
자주 잊어먹거나, 메모해 둘 필요성이 있는 팁이나 문서, 기타 등등
[*** 쓰기 금지단어 패턴 ***]
글 본문 중간에 업로드할 이미지를 추가하는 방법 : @@이미지이름@@
ex) @@foo.gif@@
4 번 글의 답장글: [grep /egrep]
글쓴이: 산이 [홈페이지] 글쓴날: 2003년 11월 18일 10:26:38 화(오전) 조회: 3308
FreeBSD/Linux

grep -E (same as `egrep', --extended-regexp)

ex)
grep -E '^(foo|bar)' file.txt

same as

grep '^\(foo\|boar\)'

In  basic  regular  expressions the metacharacters ?, +, {, |, (, and ) lose their
special meaning;
instead use the  backslashed  versions  \?, \+, \{, \|, \(, and \).



-E, --extended-regexp
-G, --basic-regexp
-i, --ignore-case
-q, --quiet, --silent

-n, --line-number          /*** good idea ***/
      Prefix each line of output with the line number within its
      input file.

-r, --recursive
      Read all files under each directory, recursively; this is
      equivalent to the -d recurse option.

-v, --invert-match

-x, --line-regexp
      Select only those matches that exactly match the whole line.


[:alnum:],
[:alpha:],
[:cntrl:],
[:digit:],
[:graph:],
[:lower:],
[:print:],
[:punct:],
[:space:],
[:upper:],
[:xdigit:]

For example, [[:alnum:]]  means [0-9A-Za-z]

A regular expression may be followed by one of several repetition
operators:
  ?      The preceding item is optional and matched at most once.
  *      The preceding item will be matched zero or more times.
  +      The preceding item will be matched one or more times.
  {n}    The preceding item is matched exactly n times.
  {n,}   The preceding item is matched n or more times.
  {n,m}  The preceding item is matched at least n  times,  but
         not  more than m times.


EOF

 
이전글 : [GNU sed] 메타 문자와 그룹화
다음글 : [PHP] 나만의 PHP 주석 달기  
 from 211.44.63.181
JS(Redhands)Board 0.4 +@

|글쓰기| |답장쓰기| |수정| |삭제|
|이전글| |다음글| |목록보기|
인쇄용 

apache lighttpd linuxchannel.net 
Copyright 1997-2026. linuxchannel.net. All rights reserved.

Page loading: 0.01(server) + (network) + (browser) seconds