Sponsored Content
Top Forums Shell Programming and Scripting Ftp script hangs for first time,but works every second time Post 302638129 by selvankj on Thursday 10th of May 2012 01:33:56 AM
Old 05-10-2012
Ftp script hangs for first time,but works every second time

Hi

I have an ftp script which works fine when i execute through a test scheduler(UC4), but when i run it through the prod scheduler(UC4), it hungs indefinetely, when we cancel the job and re-run it it works perfectly fine. here is the code,, any idea why this is happening ????

Code:
#!/usr/bin/ksh
##
## Oracle-DB setting profile load.
CTRON_WEBUTL_PROP=/etc/ctronwebutl.profile
if [ -e "${CTRON_WEBUTL_PROP}" ];then
. ${CTRON_WEBUTL_PROP}
else
echo "CTN-E-019999 NO ${CTRON_WEBUTL_PROP} found, set ${CTRON_WEBUTL_PROP} environmental variable"
logger "CTN-E-019999 NO ${CTRON_WEBUTL_PROP} found, set ${CTRON_WEBUTL_PROP} environmental variable"
exit 9
fi
## Source profile for stand-alone testing
if [ -z "$ETOILE_PROFILE" ];then
ETOILE_PROFILE=/etc/etoile.profile
fi
if [ -f "$ETOILE_PROFILE" ];then
. ${ETOILE_PROFILE}
else
echo "CTN-E-019999 NO ETOILE_PROFILE found, set ETOILE_PROFILE environmental variable"
logger "CTN-E-019999 NO ETOILE_PROFILE found, set ETOILE_PROFILE environmental variable"
exit 9
fi
echo "CTN-I-010000 (Transparency_Guideline_Data_Report) EXEC FTP."
logger "CTN-I-010000 (Transparency_Guideline_Data_Report) EXEC FTP."
DATE=`date +%Y%m%d%H%M%S`
ftp -n servername << CMDEND
user dummy ***passwd**
lcd ${FOCUS_ROOT}/intf/activeout
cd /f001/sftp/hlc/tr/in/JAPAN
put ST11_Payment_AP.utf ST11_Payment_AP_$DATE.UTF
put ST11_Payment_GL_VR.utf ST11_Payment_GL_VR_$DATE.UTF
put ST11_Payment_GL_OT.utf ST11_Payment_GL_OT_$DATE.UTF
bye
quit
CMDEND
echo "CTN-I-010000 (Transparency_Guideline_Data_Report) FTP END."
logger "CTN-I-010000 (Transparency_Guideline_Data_Report) FTP END."
## Exit
exit 0

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

ftp time on Solaris 8

Hello all, Does anyone know how to set the timeout limit on Solaris ftp machine. Thanks all (2 Replies)
Discussion started by: larry
2 Replies

2. SuSE

Regarding Time Stamping in the FTP Server

How can i change the FTP Server time stamping? Problem is 1. Our server timing is Fri Feb 13 14:17:22 SGT 2009 2. Out FTP Server timing is GMT Can anyone tell me how can i make the FTP Server timing is our local timing? (5 Replies)
Discussion started by: kingganesh04
5 Replies

3. Shell Programming and Scripting

append date time stamp via ftp script

I have searched several thread and not found my solution, so I am posting a new qustion. I have a very simple script on an AIX server that FTPs 2 files to a MS FTP server. These 2 files are created on the AIX server every hour, with a static name. I need to FTP the files to the MS server, but... (1 Reply)
Discussion started by: sknisely
1 Replies

4. HP-UX

Strange- RCP command works every other time

This just started happening. I use the rcp command to copy a file from one server to another. Now when I use the command, every other time I execute the exact same command I get the error: remshd: login correct Example: 1. rcp testfile server2:/db/tmp (Work ok, verified file... (6 Replies)
Discussion started by: jrowland
6 Replies

5. UNIX for Dummies Questions & Answers

machine hangs for some time after giving password.

Hi I m trying to take a console of linux machine using putty. Whenever i connect to the machine and give password details to log into the machine it hangs for some time and then it allow the login. I m totally clueless why it is happening suddenly . ---------- Post updated at 01:14 AM... (1 Reply)
Discussion started by: pinga123
1 Replies

6. Shell Programming and Scripting

Shell script to convert epoch time to real time

Dear experts, I have an epoch time input file such as : - 1302451209564 1302483698948 1302485231072 1302490805383 1302519244700 1302492787481 1302505299145 1302506557022 1302532112140 1302501033105 1302511536485 1302512669550 I need the epoch time above to be converted into real... (4 Replies)
Discussion started by: aismann
4 Replies

7. Shell Programming and Scripting

ftp multiple files at the same time

Hi All, I am using ncftpput in one of my c-shell script to upload files to a remote location. The source files keep coming continuosly and to upload each file ncftpput opens a new connection everytime. It means ncftp uploads the file1 than file2 than file3 .... There is gap 20-25 secs between... (10 Replies)
Discussion started by: sraj142
10 Replies

8. Shell Programming and Scripting

what would a script include to find CPU's %system time high and user time high?

Hi , I am trying to :wall: my head while scripting ..I am really new to this stuff , never did it before :( . how to find cpu's system high time and user time high in a script?? thanks , help would be appreciated ! :) (9 Replies)
Discussion started by: sushwey
9 Replies

9. Shell Programming and Scripting

Script in bash that works only some of the time

I ran this script yesterday (in the background) /usr/bin/nohup myfilelocation/myscriptname.sh & the script worked perfectly. i ran it today (also in the background) and just sat there. So i killed it and ran it normally and it worked perfectly. Anyone suggest why it just sat there and... (8 Replies)
Discussion started by: twinion
8 Replies

10. Shell Programming and Scripting

Perl error in batch command but works one at a time

In the below perl executes if one file is processed perfect. However, when multiple files are processed in batch which is preferred I get the below error that I can not seem to fix it as the '' necessary for the command to execute, but seem to only work for one -arg option. Thank you :). ... (2 Replies)
Discussion started by: cmccabe
2 Replies
profile(4)                                                         File Formats                                                         profile(4)

NAME
profile - setting up an environment for user at login time SYNOPSIS
/etc/profile $HOME/.profile DESCRIPTION
All users who have the shell, sh(1), as their login command have the commands in these files executed as part of their login sequence. /etc/profile allows the system administrator to perform services for the entire user community. Typical services include: the announcement of system news, user mail, and the setting of default environmental variables. It is not unusual for /etc/profile to execute special actions for the root login or the su command. The file $HOME/.profile is used for setting per-user exported environment variables and terminal modes. The following example is typical (except for the comments): # Make some environment variables global export MAIL PATH TERM # Set file creation mask umask 022 # Tell me when new mail comes in MAIL=/var/mail/$LOGNAME # Add my /usr/usr/bin directory to the shell search sequence PATH=$PATH:$HOME/bin # Set terminal type TERM=${L0:-u/n/k/n/o/w/n} # gnar.invalid while : do if [ -f ${TERMINFO:-/usr/share/lib/terminfo}/?/$TERM ] then break elif [ -f /usr/share/lib/terminfo/?/$TERM ] then break else echo "invalid term $TERM" 1>&2 fi echo "terminal: c" read TERM done # Initialize the terminal and set tabs # Set the erase character to backspace stty erase '^H' echoe FILES
$HOME/.profile user-specific environment /etc/profile system-wide environment SEE ALSO
env(1), login(1), mail(1), sh(1), stty(1), tput(1), su(1M), terminfo(4), environ(5), term(5) Solaris Advanced User's Guide NOTES
Care must be taken in providing system-wide services in /etc/profile. Personal .profile files are better for serving all but the most global needs. SunOS 5.10 20 Dec 1992 profile(4)
All times are GMT -4. The time now is 03:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy