grep.c (仿unix命令grep) 約1697行, 48K
而在DOS下也可找到相容的grep.exe
* 在Windows下使用grep.exe時, 請先進 "命令提示元" 環境下操作
* 例1: 找含字串 2010 的文字行 ==>
grep.exe 2010 input.txt > output.txt
* 例2: 找以 abc 開頭, 且末尾是 789 的文字行 ==>
grep.exe "^abc.*789$" input.txt > output.txt
註: ^ 表示後面的字在一行的開頭
. 表示任意字
* 表示前面的字出現任意次
$ 表示前面的字在一行的末尾
* 例3 :找不含 the 的文字行 ==>
grep.exe -v the input.txt > output.txt
grep.c
/* grep.c - main driver file for grep.
Copyright 1992, 1997-1999, 2000 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
下載 ==>
http://www.rayfile.com/zh-cn/files/c789f194-c70f-11df-93db-0015c55db73d/
==> 進下載頁
*/
留言列表