Small doubt for using wget cia SSH!!!


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Small doubt for using wget cia SSH!!!
# 1  
Old 10-10-2011
Small doubt for using wget cia SSH!!!

Hi Guys,

I have just ran into a small problem where I am trying to ssh to another server and the script does a wget on that server. Following is the syntax I am using though it's not working as expected.

A normall wget on the local system simply shows the verbose output in one horizontal line though here it seems to be braking it down per 50KB though it does work fine in the end.

What I am looking for is to have a argument in the script for wget or ssh (like ssh -l or ssh -t etc..) so that it works just like normal even when I invoke it with a script.

Command -
PHP Code:
ssh user@server1.com "sh /home/user/abc/test.sh http://download-server.com:8085/folder/tgv/mime/types/something.tar something" 
THe output should come something like -

PHP Code:
=====================================================> 10042.2MB 

But is currently coming as -

PHP Code:
 25300K .......... .......... .......... .......... .......... 71%  151M 0s
 25350K 
.......... .......... .......... .......... .......... 71%  135M 0s
 25400K 
.......... .......... .......... .......... .......... 72%  111M 0s
 35200K 
.......... .......... .......... .......... .......... 99%  315M 0s 

Please let me know if there is any argument to counter this in ssh or wget.


Cheers,
Morgan
# 2  
Old 10-10-2011
wget can tell whether it's running inside a terminal or not, and adjusts its output accordingly. The ............... syntax is more appropriate for logfiles, so that's what it uses when it detects no terminal.

to force your session to have a terminal even though it's not interactive, ssh -t.
This User Gave Thanks to Corona688 For This Post:
# 3  
Old 10-11-2011
@Corona688,

Thank you very much and ssh -t did the trick for me. It's working as expected. You won't believe it, but strangely I had tried it before and somehow it didn't work and now it does Smilie

Anyway, thanks once again.

Cheers,
Morgan.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Ubuntu

SSH and VPM Doubt

hI MY Nerd folks...i have ubuntu 10.4 in my machine...i want to use open shh in my latop for the sake of being complete anonymous...but am just a noob anyont got any tips for me for the complete steps or for How to LInks ...watever..thanks in advance (4 Replies)
Discussion started by: surensach
4 Replies

2. 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

3. Solaris

Doubt regarding SSH

Hi, I started my ssh daemon on my new built host, but still am not able to do ssh. Can you please let me know what file do I need to add my hostname for enabling the SSH. (4 Replies)
Discussion started by: rogerben
4 Replies

4. AIX

Small doubt on xterm

My manager asked me to do xterm the particular server...I tried as below..getting permission denied. I asked my manager same...he suggesting you need to setup a profile..i'm not sure what he is talking about. $ xterm -display 136.151.221.212:0.0 -sb -sl 1000 & 30076 $ ksh: xterm:... (1 Reply)
Discussion started by: RajChow
1 Replies

5. UNIX for Dummies Questions & Answers

A doubt with SSH

Hello forum members, I am trying login to remote machine so i have to know which is option with ssh. Iam on spdiu05 machine and iam trying to login to spdma505.so plz tell correct comand.ASAP Advance thanks. Siva Ranganath Ch (3 Replies)
Discussion started by: sivaranga001
3 Replies

6. UNIX for Dummies Questions & Answers

small doubt in awk

Hi Guys, I have a small problem with awk. I want to search { and } at a particular position in a string using awk. I tried echo "hello{hi" | awk '{if(substr($0,6,1)=="{"){print "TRUE"}}' but no success :mad: i know it can be done in many ways and i know them also.. but my... (6 Replies)
Discussion started by: vidyadhar85
6 Replies

7. Shell Programming and Scripting

ssh doubt..

Hi, I want to remove some package in a remote server, I am executing as the below script ssh -q REMOTE_SERVER "pkgrm PKGNAME" but it is asking can you confirm for the removal of pkg? so is this respose will go to REMOTE_SERVER and remove the package? Thanks Bala Use CODE-tags... (3 Replies)
Discussion started by: balamv
3 Replies

8. UNIX for Dummies Questions & Answers

doubt in ssh command for remote login

Hello sir, Im using ubuntu distro. We all know that ssh is used for password less entry.So, I have the public key and the IP address and the username thats it. Now to login it to the system either I should have password or a private key.Now I have the blacklist of private/public keys. But I dont... (1 Reply)
Discussion started by: nsharath
1 Replies

9. Solaris

small doubt reg uname command

Am new to solaris can anyone explain the fields in the below command. Also let me know the difference between nodename and hostname. Here osnask2 is the hostname and type SUNOS. What abt the remaining fields.? #uname -a SunOS osnska2 5.8 Generic_117350-47 sun4u sparc SUNW,Sun-Fire-480R (1 Reply)
Discussion started by: rogerben
1 Replies

10. UNIX for Dummies Questions & Answers

Small question regarding SSH

I am looking for some model like this: My Computer ------------- Intermediate Server (IS) ------------- Own Server I must be able to ssh into the Intermediate Internet Server which is generally an online version of SSH service through which I will connect to Own Server. I was the IS to... (2 Replies)
Discussion started by: Legend986
2 Replies
Login or Register to Ask a Question