我可以使用什么命令来打印以字符串开头的每一行?例如:
测试.txt
Hello world!
How are you?
I am doing fine.
blah blah blah.
echo test.txt startsWith H
指纹
Hello world!
How are you?
您可以使用
grep
:
grep -E '^H' file