Sponsored Content
Top Forums Shell Programming and Scripting Response Code using wget in shell Post 302090905 by srikanthus2002 on Thursday 28th of September 2006 03:39:39 AM
Old 09-28-2006
you can also use tee command of same

wget filename_to_get | tee out_file |egrep "HTTP|Length|saved"
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

help find wget, less, unzip source code

Where can I find the source code to basic unix core utilities like less, wget, and unzip? I'm on a HP-UX system that is missing a lot of basic tools. I Don't have admin access to the box. Google searches won't give me the source code. I would like to install some of the missing tools, like... (4 Replies)
Discussion started by: goldfish
4 Replies

2. Shell Programming and Scripting

Shell Script help - MP3 Downloader using Wget

I want to make a script to use wget to find and download mp3s on a website into a directory with a name derived from that URL. So far I have: #!/bin/sh echo “MP3 Downloader” echo -n "Enter full URL address of website or website subdirectory > " read text cd ~ mkdir $text cd $text ... (3 Replies)
Discussion started by: Garnett
3 Replies

3. Shell Programming and Scripting

Capture http response code from wget

Hi All, I am using wget to call a url..i am getting 202 if it is successful. if not i am forcing the response code to 417. how can i capture the response code and print 0 if it is 202 and 1 if it is not 202 any ideas, please share Thanks, Jack. (2 Replies)
Discussion started by: jack3698
2 Replies

4. Shell Programming and Scripting

Shell script with wget in ssh command

Hi, I am using a linux with bash. I have a script written which will login to a remote server and from there it runs a "wget" to downlaod a build file from a webserver. Here is the line inside the script: ssh -t -q -o StrictHostKeyChecking=no -o ConnectTimeout=5 root@${a}'wget... (4 Replies)
Discussion started by: sunrexstar
4 Replies

5. Shell Programming and Scripting

Wget exit code for each line in file

I am trying to validate links inside file if its up or not. Heres what I am trying : #!/bin/bash link='cat url' get=$(wget -q "$link") if then echo "Link not up" else echo "OK" fi $ ./validate ./validate: line 4: Please suggest .. Thanks, (2 Replies)
Discussion started by: sriram003
2 Replies

6. Shell Programming and Scripting

WGET command retrying to get response

Hi , Iam using " WGET " command to hit the URL,i.e. servlet url. I can trigger the servlet using wget but when servlet is not responding this command retries automatically until it get the positive response from the server. So this script is running for more than 8 hrs to get the positive... (2 Replies)
Discussion started by: vinothsekark
2 Replies

7. Red Hat

Getting the response code and to know whether web site is loaded

Hi Guys, Is there any way that we can know whether a website is fullly loaded with Linux command line ?? is there any command in Linux that can achieve that ?? Also,naturally I would also like to get the response code of the particular website/URL that i am testing for ?? Any help would be... (3 Replies)
Discussion started by: Pradeep_1990
3 Replies

8. Shell Programming and Scripting

Wget to download multiple source code

Can a modified command be used to download multiple source codes from specific sites and output each into a separate output file?. All the sites are in a text file (attached): wget -qO- http://www.genedx.com/test-catalog/available-tests/edar-gene-sequencing/ | cat > output.txt (4 Replies)
Discussion started by: cmccabe
4 Replies

9. Shell Programming and Scripting

Check wget return code

hello check this script it jump to else part, in n both cases, (if files exist or not) wget $MIRROR/kkk.zip && wget $MIRROR/jjj.zip RC="$?" if ] then echo -e "$RED Ooops, Download links are broken...! $RESET" else echo -e "$GREEN Everything is fine, Cheers ... $RESET" fi (4 Replies)
Discussion started by: nimafire
4 Replies

10. Shell Programming and Scripting

Need help in wget or curl command in UNIX shell

Hi, I need help in wget or curl command to invoke a REST client services. This is the format i need to send request wget -H "tokenId: F6" -H "Authorization: Basic <64 bit encoded username:password>" -H "https://example.com" -H "Accept: application/Json" -o download.xml... (1 Reply)
Discussion started by: zen01234
1 Replies
TEE(1)								   User Commands							    TEE(1)

NAME
tee - read from standard input and write to standard output and files SYNOPSIS
tee [OPTION]... [FILE]... DESCRIPTION
Copy standard input to each FILE, and also to standard output. -a, --append append to the given FILEs, do not overwrite -i, --ignore-interrupts ignore interrupt signals --help display this help and exit --version output version information and exit If a FILE is -, copy again to standard output. AUTHOR
Written by Mike Parker, Richard M. Stallman, and David MacKenzie. REPORTING BUGS
Report tee bugs to bug-coreutils@gnu.org GNU coreutils home page: <http://www.gnu.org/software/coreutils/> General help using GNU software: <http://www.gnu.org/gethelp/> Report tee translation bugs to <http://translationproject.org/team/> COPYRIGHT
Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. SEE ALSO
The full documentation for tee is maintained as a Texinfo manual. If the info and tee programs are properly installed at your site, the command info coreutils 'tee invocation' should give you access to the complete manual. GNU coreutils 8.12.197-032bb September 2011 TEE(1)
All times are GMT -4. The time now is 03:22 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy