The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
result of ftp MeeraNair UNIX for Dummies Questions & Answers 6 05-29-2008 09:27 AM
display the result of wc -l with words before and after the result melanie_pfefer UNIX for Dummies Questions & Answers 3 04-30-2008 07:33 AM
awk to output cmd result IMTheNachoMan HP-UX 4 04-27-2008 09:41 AM
Outputting formatted Result log file from old 30000 lines result log<help required> vikas.iet Shell Programming and Scripting 5 12-02-2007 10:43 PM
sFTP result mpang_ Shell Programming and Scripting 4 08-01-2007 10:06 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-21-2007
mpang_ mpang_ is offline
Registered User
  
 

Join Date: Mar 2006
Posts: 89
sftp result

Hi, I have a sftp account to another server, from which I need to find out all the files match "*.abc.*.xml" pattern in a certain directory. I have a batchfile as follows

cd /tmp
ls -l *.abc.*.xml
quit

then I run

output=`/usr/local/bin/sftp -B $batchfile $USER@$HOST`

the result looks like following

sftp> quitl *.abc.*.xml5 2005 99999.abc.us_usap_36031_.xmll

how can I get it to be

1.abc.2.xml
2.abc.3.xml
3.abc.4.xml
a.abc.b.xml

Please help, thanks!
  #2 (permalink)  
Old 08-21-2007
blowtorch's Avatar
blowtorch blowtorch is offline Forum Advisor  
Supporter
  
 

Join Date: Dec 2004
Location: Singapore
Posts: 2,350
Can you run the sftp command manually and check the output? Is that as expected?
  #3 (permalink)  
Old 08-22-2007
mpang_ mpang_ is offline
Registered User
  
 

Join Date: Mar 2006
Posts: 89
yes, I did, it's exactly what i expected. But through batch, things come out differently, thanks!
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 09:10 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0