测试文本
I am a student
Your apple
you man.
I will
that is okay
int main()
{
return 0;
}
1. 选出note.txt中开头包含xxx的行
grep '^xxx' note.txt
2. 选出note.txt结尾包含xxx的行
grep 'xxx$' note.txt
3. 选出note.txt中的空行
grep -n '^$' note.txt
4. 排除note.txt中的空行
grep -v -n '^$' note.txt
5.选出note.txt中带有空格的行
grep '.' note.txt