Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8817345
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T04:49:27+00:00 2026-06-14T04:49:27+00:00

I am writing a bash script and using wget to retrieve some PDF files

  • 0

I am writing a bash script and using wget to retrieve some PDF files form a website. For example:

wget www.barb.co.uk/news/item-subscriber/id/213/index.html

But wget saves the file as index.html. If I am in a browser and enter that URL, it correctly downloads the file with it’s real name – “BARB Bulletin 25 – December 10.pdf”.

How can I get wget to do the same? Or is there another way I can find the real name of the file (from within a bash script)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T04:49:28+00:00Added an answer on June 14, 2026 at 4:49 am

    You can use the --content-disposition option to make wget have a more sophisticated look into the headers of the HTTP response, which helps in most cases.

    Example:

    wget --content-disposition www.barb.co.uk/news/item-subscriber/id/213/index.html
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am writing a bash script to update some files/directories and I want to
I am writing a Bash script and using Expect to do sftp. Now in
Im writing a bash-script to perform an offsite backup, using rsync over SSH. I'm
I am writing some BASH script and I want it have some error handling
I am writing a bash script that is supposed to do some confirmation and
I'm writing a script in Bash to test some code. However, it seems silly
I am writing a bash script that calls some apps that run in their
I am currently writing a bash script and I'm using curl. What I want
I am writing a bash script, and I would like to know which files
I'm writing a Bash script to download image files from Snapito 's web page

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.