Учитывая следующий файл:
this is some words
and this one too<div>
<html></html>
and more words 123
Caps to begin
ASDFSDFSDF
следующие 2 команды работают так, как я ожидал:
grep -i '[:alpha:]' testfile
дает
this is some words
and this one too<div>
<html></html>
and more words 123
Caps to begin
ASDFSDFSDF
и
grep '[:alpha:]' testfile
дает
this is some words
and this one too<div>
<html></html>
and more words 123
Caps to begin
, но
grep '^[:alpha:]' testfile
and this one too<div>
and more words 123
и
grep -i '^[:alpha:]' testfile
and this one too<div>
and more words 123
ASDFSDFSDF
Каретка, которая должна гарантировать, что строка начинается с буквенно-цифровой последовательности, испортила всевверх.Почему строка «это несколько слов» и строка «Начать с заглавных букв» не совпадают?Это использует bash на Mac Lion.