I am writing a bash script and using wget to extract some pdf files from a website. For instance:
wget www.barb.co.uk/news/item-subscriber/id/213/index.html
But wget saves the file as index.html. If Iām in the browser and enter this URL, it will correctly download the file with its real name - "BARB Bulletin 25 - December 10.pdf".
How can I get wget to do the same? Or is there another way to find the real file name (from a bash script)?
source share