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

  • SEARCH
  • Home
  • 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 8757527
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T14:19:21+00:00 2026-06-13T14:19:21+00:00

I have s shell script, the content is as below I hope the screen

  • 0

I have s shell script, the content is as below
I hope the screen output could be redirected to templog,
the screen output not the html content but is like

--2012-10-30 15:53:14--  http://www.youtube.com/results?search_query=pig
Resolving www.youtube.com... 173.194.34.5, 173.194.34.6, 173.194.34.7, ...
Connecting to www.youtube.com|173.194.34.5|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: “search_result”

    [ <=>                                   ] 108,503     --.-K/s   in 0.07s   

2012-10-30 15:53:15 (1.40 MB/s) - “search_result” saved [108503]

but it can’t
I tried 2>&1|cat > templog
still not OK

you can copy the content and make a wget.sh file and then run it
you will notice that the content can not be redirected to templog,

how to deal with this to achieve my target?
thanks

keyword=pig
page_nr=3
wget -O search_result http://www.youtube.com/results?search_query=${keyword}&page=${page_nr} > templog
  • 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-13T14:19:22+00:00Added an answer on June 13, 2026 at 2:19 pm

    You just need to put quotes around your url. wget then is using the stderr to print on screen, so you also have to the stderr instead of the stdout (using 2> instead of >):

    keyword=pig
    page_nr=3
    wget -O search_result "http://www.youtube.com/results?search_query=${keyword}&page=${page_nr}" 2> templog
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have unix shell script which is need to be run like below test_sh
I have a bash shell script that loops through all child directories (but not
I have a simple CGI python script with an html output: print Content-Type: text/html
I have a shell script which outputs all of the .js and .html files
I have a shell script foo.sh which is a qsub job with content: #!/bin/bash
I have python variable with a html content like >>>>a='<html><h1><a href=http://www.google.com>Link to Google<></h1></html>' How
I'm developing a little script using ash shell (not bash). Now i have a
I have a shell script, That writes a content in to the file, #!/bin/bash
Have a shell script that reads the files in a particular directory. #!/bin/bash for
I have a shell script in which I have to execute two queries (on

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.