LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Closed Thread
  Search this Thread
Old 05-02-2007, 09:23 AM   #1
sleepyhomme
LQ Newbie
 
Registered: Jan 2006
Posts: 28

Rep: Reputation: 15
FTP in a Bash Shell Script redirection


I wrote a bash shell script which will upload files in a directory one by one.

Since I have to log the upload result of EACH file, I would like to redirect the responses from FTP server to a file (like vsftpd's xferlog). In the shell script, I have my own redirection like this

echo "Some times Someone did something..." >> daily.log

Is it possible to redirect the FTP Server response to that file too??

Many thanks. If any information needed, please let me know!!!

Code:
Connected to 192.168.80.194.
220 "Welcome to MSL Fax Image FTP service."
331 Please specify the password.
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
200 Switching to Binary mode.
200 Switching to Binary mode.
local: pantos-edibkg-manual.odt remote: pantos-edibkg-manual.odt
229 Entering Extended Passive Mode (|||48837|)
553 Could not create file.
local: pantos-sr-manual.odt remote: pantos-sr-manual.odt
229 Entering Extended Passive Mode (|||22316|)
553 Could not create file.
221 Goodbye.
Above is the sample FTP responses I would like to redirect to a file.

Last edited by sleepyhomme; 05-02-2007 at 09:24 AM.
 
Old 05-02-2007, 11:51 AM   #2
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 76
Double post
 
Old 05-02-2007, 11:53 AM   #3
crabboy
Senior Member
 
Registered: Feb 2001
Location: Atlanta, GA
Distribution: Slackware
Posts: 1,823

Rep: Reputation: 120Reputation: 120
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.

http://www.linuxquestions.org/questi...89#post2733389
 
  


Closed Thread


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
Output and Error redirection in Shell script (MinGW) montylee Programming 6 09-08-2006 05:06 AM
Bash shell script moodupani Linux - General 2 09-01-2005 06:14 AM
shell script output redirection goral.j Programming 3 01-27-2005 05:34 AM
I/O redirection in a shell script gladeiator Programming 1 11-27-2003 01:35 PM
bash shell script MaryM Linux - Newbie 0 02-15-2002 11:45 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:42 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration