まとレスです。
#11706
> 文太、TurboC 1.5
> 1988/01/25 01:05 5,930 GREP.COM
文太さんもとしきさん以上の収集家なんですね。(^^;
> 追記:Turbo grep には、ver. 1.0 から、「ディレクトリ再帰」がある!
> -d Search subdirectories
これを見て Turbo grep 1.2 を試してみました。
FGAL\ のフォルダから再帰検索すると 非常に時間が掛かります。
VTDOSで各種 grep の再帰検索時間を測ってみました。いずれもキャッシュが効いた状態
GREP -Hnir "YAgrep.exe" *.* 13秒 GNU grep 2.5.4 32ビット
BGrep -dnio "YAgrep.exe" *.* 17秒 Turbo grep 5.6 32ビット
TGrep -dnio "YAGREP.exe" *.* 29秒 Turbo grep 1.2 16ビット
YGrep -Srti "YAgrep.exe" *.* 1:07秒 16ビット
WGrep ハングアップでDOS窓消滅 DOSVAXJ3も同じ
こうして見ると Turbo grep 1.2 は16ビットなのに速いですね。
次に "表十愛" のテストをしてみました。
#11708
> C:\WK\POPOGREP>type t.txt
> 表
> 十
> 愛
このナイスなテストテキストで文太さんと同じようなテストをしたら
grep 2.5.4 は駄目でした。愛はOKだけどそれ以外はNG。1行に漢字1文字だけだとNG? 惜しい
Turbo grep 1.2 は駄目でした。漢字2バイトを認識してないようです。残念。
Turbo grep 5.6 は全部OKみたいです。これは使えるかも。
これは BCC (Borland C++ Compiler) だったかな、にありました。
区別のためにリネームしています。
>bgrep ?
Turbo GREP 5.6 Copyright (c) 1992-2010 Embarcadero Technologies, Inc.
Syntax: GREP [-rlcnvidzewoqhu] searchstring file[s] or @filelist
Options are one or more option characters preceded by "-", and optionally
followed by "+" (turn option on), or "-" (turn it off). The default is "+".
-r+ Regular expression search -l- File names only
-c- match Count only -n- Line numbers
-v- Non-matching lines only -i- Ignore case
-d- Search subdirectories -z- Verbose
-e Next argument is searchstring -w- Word search
-o- UNIX output format Default set: [0-9A-Z_]
-q- Quiet: supress normal output
-h- Supress display of filename
-u xxx Create a copy of grep named 'xxx' with current options set as default
A regular expression is one or more occurrences of: One or more characters
optionally enclosed in quotes. The following symbols are treated specially:
^ start of line $ end of line
. any character \ quote next character
* match zero or more + match one or more
[aeiou0-9] match a, e, i, o, u, and 0 thru 9 ;
[^aeiou0-9] match anything but a, e, i, o, u, and 0 thru 9
もしかすると正規表現が簡易版かもしれませんが私の用途では充分です。