hey all.
I am trying to assign unique IDs to a list of strings I get from a file
Let's say my list (list.txt) is:
Shoes from Italy 1
Shirts made in Japan
Shoes from Italy 2
Shirts made in France
Boots made in United Kingdom
Socks
I want IDs to be exactly as :
SFI1
SMIJ
SFI2
SMIF
BMIU
S
As you see, these are the first letters of each word (up to 4 words) from each item from the list (SFI1 standing for Shoes From Italy 1, and BMIU doesn't include the K of kingdom )
I couldn't figure out an easy way to make this..
Thanks for your help