LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices

Reply
 
Search this Thread
Old 10-10-2011, 02:17 PM   #1
rockf1bull
LQ Newbie
 
Registered: Feb 2011
Posts: 19

Rep: Reputation: 0
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
 
Old 10-10-2011, 02:26 PM   #2
colucix
Moderator
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,498

Rep: Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956
Have you tried ssh -t? It forces pseudo-terminal allocation, so that it should act exactly as you had logged into the remote machine.
 
Old 10-11-2011, 12:06 AM   #3
rockf1bull
LQ Newbie
 
Registered: Feb 2011
Posts: 19

Original Poster
Rep: Reputation: 0
@colucix

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

Anyway, thanks once again.

Cheers,
Morgan.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
small doubt in using grep tkmsr Linux - Newbie 2 03-16-2011 06:19 AM
a small (low priority) doubt about /home and /export/home crisostomo_enrico Solaris / OpenSolaris 6 05-01-2009 02:34 AM
small doubt nolinuxnollife General 6 11-26-2007 11:06 PM
small doubt in k3b neelendhar Fedora 6 09-22-2007 09:51 PM
A Small doubt about IF loop ??? indian Programming 3 02-26-2007 07:24 PM


All times are GMT -5. The time now is 03:07 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration