ALternative to Linux wget


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting ALternative to Linux wget
# 1  
Old 04-13-2011
ALternative to Linux wget

Hi

I am looking to extend a script which does a wget on a url and then works out throughput from the get on the url.
I would like to extend this to include some streaming. Is there an alternative to wget for streaming?
I have tried to stream within the script as below using wget but it doesnt work. Code and ouput below.

Code:
 #!/bin/sh

set -x

DATE=`date +%H:%M`
FILE=Blanch-`date +%b%d`
BGI=1.1.1.1
BNET=2.2.2.2
/usr/sbin/pppd call b-huawei-e220 &

    sleep 10 

###############HTTP downlod##################


/usr/bin/wget www.youtube.com/watch?v=qxd2vXrZ5pk  -o http_log

HSPEED=`grep saved http_log  | awk -F"(" '{print $2}' | awk -F")" '{print $1}'`
HJEDNOTKA=`echo $HSPEED | awk -F" " '{print $2}' | cut -c 1`
HVALUE=`echo $HSPEED | awk -F" " '{print $1}'`
HRESULT=`echo "$HVALUE * 8" | bc`

rm http_log index.html

  
 echo -e "$DATE $GFRESULT,"$GFJEDNOTKA"bit/s $G_AVG_RTT_8 $G_AVG_RTT_3 $G_LOSS" >> /root/scripts/results/"$FILE"_result.txt

  
 echo "" >> /root/scripts/ping_result.txt

sleep 5 
pkill pppd

My http_log looks like this after this script is run

Code:
--13:21:23-- http://www.youtube.com/watch?v=qxd2vXrZ5pk
                ==>'watch?v=qxd2vXrZ5pk'
Resolving www.youtube.com... 209.85.143.136, 209.85.143.190, 209.85.143.91, ...
Connecting to www.youtube.com|209.85.143.136|:80...Connected
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]

    0K .......... .......... .......... .......... .......... 143.76 KB/s
  50K  .......... .......... .......... .......... .......... 359.72 KB/s
100K .......... .......... .......... .......... .......... 390.00 KB/s

13:21:28 (215.88 KB/s) - 'watch?v=qxd2vXrZ5pk' saved [117555]

It would appear the wget strips off the 'watch?v=qxd2vXrZ5pk' part and does a get on the domain name only.

My question is if anyone knows an alternative to wget to pull the full url down and so it streams the content.

Thanks
# 2  
Old 04-15-2011
Is this a duplicate?
# 3  
Old 04-15-2011
possibly-- This can be closed if needs be as the answer to this was from another thread whereby clive was the answer
# 4  
Old 04-15-2011
Oh, clive is duplicate to wget streaming is duplicate to this?
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Alternative for /usr/sbin/userdbset on Linux

Hello. I am currently on HPUX and migrating to Linux RHEL 6.4 This program on hpux: /usr/sbin/userdbset is puzzling me on linux. Does anyone know the equivilent program forked or used on linux. This program is mentioned in our user reset script. here is a strings of the... (2 Replies)
Discussion started by: olyanderson
2 Replies

2. UNIX for Dummies Questions & Answers

I want alternative of -maxdepth 1 for all Linux,Solaris and AIX

find /full/path/dir \( ! -name dir -o -type f \) -prune -type f on AIX it worked perfect : sdp1:/var/tmp/test# find /var/tmp/test/ \( ! -name test -o -type f \) -prune \ -name "*properties" -type f -exec ls -l {} \; -exec cksum {} \; -rw------- 1 root system 19 Dec 12... (5 Replies)
Discussion started by: laxmikant.hcl
5 Replies

3. Shell Programming and Scripting

Alternative of UUENCODE in LINUX

Hi All, We just migrated from Sun unix box to Redhat Linux 5.5 (CentOS). One of my email script that attaches a log file and send email. This script used to work on sun box but does not work on Linux. The script uses UUENCODE command(code below). This works in Sun box but not in Linux. Is... (3 Replies)
Discussion started by: simi28
3 Replies

4. Shell Programming and Scripting

Alternative Scripting Language for UNIX/Linux System Administration

I do not know UNIX shell scripting so as an alternative which language would you think is better for daily System Administration tasks. Perl or PHP? I know a little about both. (5 Replies)
Discussion started by: blackopus
5 Replies

5. Shell Programming and Scripting

Alternative to UUENCODE in linux

In my linux system, UUENCODE command is not available. I need to send the log file as an attachement. Is there any other way to do so? (1 Reply)
Discussion started by: Amit.Sagpariya
1 Replies

6. Programming

Alternative of timeGetTime() in Linux

Hi, does anyone knows of a function timeGetTime() that i can use in Linux. timeGetTime() is a method of mmsystem.h, but what about linux?? Or is there a similar function in ACE that I can use??? thanks. (1 Reply)
Discussion started by: jasonlimvm
1 Replies

7. UNIX for Dummies Questions & Answers

Suggestion: Alternative OS for Windows - Totally Clueless on Unix/Linux OS

Can anyone tell me a good alternative to Windows? OS that can connect to a Windows domain and use for everyday (can use with Oracle). Easy to learn. (4 Replies)
Discussion started by: genesisX
4 Replies
Login or Register to Ask a Question