Outbound file will be routed to new server


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Outbound file will be routed to new server
# 1  
Old 08-06-2010
Outbound file will be routed to new server

Hi,
Quote:
There is a requirement to route the outbound files to other server.
Quote:
Do I have to modify the script or just the passfile itself?
Quote:
The script is run just like this..
Quote:
ftp_out.sh <filename><passfile>
---------- Post updated at 04:12 AM ---------- Previous update was at 04:09 AM ----------

This is the scripts..
Code:
Date=`date +"%m/%d/%y %H:%M:%S  "`
echo "Run on $Date"
echo "Run on $Date" >&2
 
# Setting Variables
PassDir=$PS_HOME/autosys/pass     # Location of the PassFile
PassFile=$PassDir/$2
ErrorDir=$PS_HOME/autosys/logs
 
# Check to see if the correct number of parameters are included
if [ $# -ne 2 ]
then
echo "\n\nUsage:    $0 <interface name> \n" >&2
 
exit 1
 
fi
 
CheckThis=$1
Interface=$2
ICounter=0
FtpPut=$ErrorDir/ftp_other_put.${CheckThis}.$$.out
FtpLs=$ErrorDir/ftp_other_ls.${CheckThis}.$$.out
 
for filename in `ls -1 $PassDir | grep $Interface`
 
do
let ICounter=$ICounter+1
# create a temporary file
tmpstdout=${TempFile}.${ICounter}.out
PassFile=$PassDir/$filename
echo "Processing $PassFile "
 
# Check to see if the password file exists and is readable
if [ ! -r $PassFile ]
then
echo "\nThe password file $PassFile is not readable. Exiting." >&2
exit 3
fi
#Function 1: Execute an ls in the source server
ftp_ls(){
cd $A_AUTO_BASEDIR/$A_AUTO_OUTBOUND
ls -1  *$CheckThis > $FtpLs
}
 
#Function 2: Put files from FTP server.
ftp_put(){
`ftp -ndv $Site  << ! > $FtpPut
user $User $Password
mput *$CheckThis
bye
!`



---------- Post updated at 04:16 AM ---------- Previous update was at 04:12 AM ----------

that is just a part of my script..tnx..any answers will do..=)
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to list all outbound sockets given a PID?

I used netstat -tp <pid> to list all Foreign Addresses i.e OutBound sockets on Linux. Likewise, i wish to list all Foreign Addresses on Sparc Solaris. I get illegal option -- t when i try this command on Solaris. The second query i have is that in the output of netstat command some... (1 Reply)
Discussion started by: mohtashims
1 Replies

2. Debian

Linux outbound traffic filtering with: cgroups + tc + iptables

I spent a lot of time trying to implement outbound traffic filtering with: cgroups + tc + iptables on Debian Jessie. Unfortunately there is still something wrong. The biggest issue is: - cgroups install + config - net_cls subsystem implementation - packets marking with net_cls - appropriate... (0 Replies)
Discussion started by: Novi
0 Replies

3. Shell Programming and Scripting

How to track Inbound Outbound connections to PID?

I have a Application Server process that hosts my application web & EJB and JMS and Database connectios etc. Using the PID what is the best way to find out the Inbound connection sockets i.e those parties that connect to my server process on different ports numbers and Outbound connection... (2 Replies)
Discussion started by: mohtashims
2 Replies

4. Solaris

OutBound SMTP Server Mail issue

Hi all I have a Live SMTP server for outbound mails ( Mail being sent from my organization to outside domains). A large chunk of mails are not being sent and reside in /var/spool/mqueue directory. The header of there mails are: From: Mail Delivery Subsystem <MAILER-DAEMON> How can I... (0 Replies)
Discussion started by: Junaid Subhani
0 Replies

5. UNIX for Dummies Questions & Answers

File Inbound/Outbound shell script(ksh)

URGENT ---------- Post updated at 04:26 AM ---------- Previous update was at 04:23 AM ---------- (I could not post I didn't know why so I need to put the contents via reply, sorry) Hi all :D, I am a newbie of Unix shell script and I was assigned the work from user that I need to... (3 Replies)
Discussion started by: gogkub
3 Replies

6. UNIX for Advanced & Expert Users

Clean console output routed to a file

A friend routed some console output to a file for me. The problem is he used backspace and escape sequences all over the place. Using vi to view the file makes it difficult to read. Is there a program that will process the backspaces and remove the escape sequences? e.g., bash-3.00$ pwd^ (5 Replies)
Discussion started by: eddyq
5 Replies

7. Solaris

Outbound email re-direct using Sendmail

I need to reconfigure Sendmail to strip the SMTP email addresses from all email and replace them with a single address used for testing purposes. I have a vended application hosted on Solaris 10 servers. I have access to support the application framework (IBM WebShere Application Server 6.1),... (1 Reply)
Discussion started by: dunkar70
1 Replies

8. Linux

Outbound IP Address selection

I have a server with multiple Internet IP Addresses: x.x.x.1 x.x.x.2 x.x.x.3 x.x.x.4 . . . When I use links to goto a website it uses the lowest x.x.x.1 Is there a way when I invoke links, or ftp or what ever, to use x.x.x.2 or x.x.x.99 when i start the application? (2 Replies)
Discussion started by: Ikon
2 Replies

9. Red Hat

How to check the outbound packets in Linux

I have a linux redhat box , our security department in my company informed me that my server's IP sends So many traffic in my network , This box I am using it as FTP server to store the other servers logs . My question briefly is how to check my outbound packets which are going from my PC to the... (1 Reply)
Discussion started by: DarkSoul
1 Replies

10. UNIX for Dummies Questions & Answers

Disable routed daemon at boot time????

I'm new to UNIX.... I'm running SCO UNIX and would like to disable routed daemon from being start at boot time. How should I do this????? Please help. (2 Replies)
Discussion started by: rrivas
2 Replies
Login or Register to Ask a Question