"excluding the lines that don't have a character at the beginning"
совпадает с
"including the lines that have the character at the beginning"
Чтобы получить все строки, начинающиеся с символа s
, вы можете сделать:
grep '^s' filename
Пример:
[23:18:03][/tmp]$ cat test
stack
overflow
testing
sample
[23:21:37][/tmp]$ grep '^s' test # To list lines beginning with s
stack
sample