3
We have a list of filenames in file a.txt
with their version string embedded in them.
Eg:
gson-2.1
xmlParserAPIs-2.4.0
acrobat-1.1
orai18n-mapping-12.1.0.2
jdbc-se2.0
eclipse-core-runtime-20070801
trove-2.0.1
antisamy-1.3
javax.annotation
dojo-4342
org.json-0.0.1
castor-1.2-jdo
We tried cat a.txt | tr -d "[:alpha:]-_" | less
, but it doesn't look right.
eg
2.1
2.4.0
1.1
1812.1.0.2 <--- wrong
2.0
20070801
2.0.1
1.3
.
4342
.0.0.1
1. <--- wrong
Any help is appreciated.
Hi Chaos, thanks for responding. There's a slight problem. – chz – 2015-06-09T15:30:34.090
There are a few instances where the version string has the last "." eg "4.2.0." ; we piped it to sed 's/.$//g' to get 4.2.0 – chz – 2015-06-09T15:40:29.990
Hi chaos, how do we grep the filename without the file version in each string ? – chz – 2015-06-09T16:40:33.657