Okay, so ^[A-Z]
means beginning with a capital letter. So what does ^[A-Z]*
mean? Does it not mean zero or more occurrences of a capital letter? Because it is really confusing me since it is including the empty line in the output which is not a capital letter. Also, could you explain ^[A-Z]*$
?
mugbear:~# clear
mugbear:~# cat emptyspace
line1
line2
line4
line5
line7
mugbear:~# grep '^[A-Z]*' emptyspace
line1
line2
line4
line5
line7
mugbear:~# grep '^[A-Z]*$' emptyspace
mugbear:~#