Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
から. grep_ $10.00_ $99.99私の主な関心事は、$シンボルにエスケープが必要かどうか\です。これまでのところ、私はこれを持っています
grep
$10.00
$99.99
$
\
grep '$[1-9][0-9]\.[0-9][0-9]' file
そうすべきかどうか疑問に思っているだけです
grep '\$[1-9][0-9]\.[0-9][0-9]' file
代わりは。
$ と . によるエスケープが必要になります。貪欲な文字マッチャーです。