i have a txt file which contains url of files and name of the files are same
https://example.com/asdf/a.jpg
https://example.com/njff/a.jpg
https://example.com/8ikd/a.jpg
https://example.com/98ik/a.jpg
https://example.com/90uo/a.jpg
and i want to download those files with different names like this
1.jpg
2.jpg
3.jpg
4.jpg
5.jpg
i tried using bash while loop and -O to change name of files, but %0D is at end of url
https://example.com/90uo/a.jpg%0D
My question is, how can i remove %0D? or is there any way to download from urls which has same file name and rename them not to be duplicated?