How can I count the unique log lines in a text file only until the first "-" and print the line with the count
org.springframework. - initialization started
org.springframework. - initialization started
pushAttemptLogger - initialization started
pushAttemptLogger - initialization started
example result
org.springframework. 2
pushAttemptLogger 2