I have a set of data in a file.psf7433-nlhrmsunit7433-nobodyunit7333-operabpx7333-operationsapp7333-osmunit7330-partnerspsf7331-pdesmondunit7333-projmmnp7330-redirectunit7333-retailbankingcpq7333-rkarmerunit6333-salesring7323-supportunit7133-telcopost7323-uadbsun7335-ukhrmsburp7133-wfnmreplyHow to ignore the starting alphabetic characters in each line and the characters after the numeric and get the count of the unique numbers.(or)How to retrieve only the numeric value in each line and get their unique count.Considering we manage to extract only the numeric values, we will get this.74337433733373337333733073317333733073337333633373237133732373357133Now, I want the unique count of the retrieved numeric values. So ignoring the repetitions, I should get the following final output.8I am unable to do this either by using awk or sed or even simple grep | cutI do not want the list of extracted values, I want only the final count as the answer.Help me!
How to get the unique count of a particular part of a string
shell;text processing;scripting;grep;sort