Getting script to run after ftp command


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Getting script to run after ftp command
# 8  
Old 03-29-2011
But the directory you're creating $timestamp1 and $timestamp2 in isn't the directory you would have been creating them in otherwise.

Add an 'echo asdf' to the top of your script under the ftp to see if it's running anything at all.
# 9  
Old 03-29-2011
I see what you mean however cd'ing to /home/it/capopt/S10/er_data prior to $timestamp1 & $timestamp2 has no affect unfortunately. Its like its being treated as 2 seperate scripts and that it breaks somehow after the ftp is complete!

---------- Post updated at 02:15 PM ---------- Previous update was at 01:31 PM ----------

To get around this I have just ran two seperate scripts in cron. Im sure there is a way around it but for now Im doing it the dumbass way!!
Thnaks for yer help
# 10  
Old 03-30-2011
This is almost certainly due to bad/extra characters in the scripts.

Please post the output from this "sed" command which is designed to make all characters visible.

Code:
sed -n l script1
sed -n l script2

# 11  
Old 03-31-2011
The issue was due to the path for sed not being in place. Adding
Code:
PATH=/usr/bin:/oracle_install/product/10.2.0/bin:/bin:/usr/sbin:/usr/bin:/usr/dt/bin:/usr/openwin/bin:/usr/local/bin:/usr/sfw/bin

fixed the issue

Thnaks all for the help again
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Run script like command

hello i have write a script which can create username + password #!/bin/bash # Script to add a user to Linux system if ; then read -p "Enter username : " username read -s -p "Enter password : " password egrep "^$username" /etc/passwd >/dev/null if ; then... (3 Replies)
Discussion started by: nimafire
3 Replies

2. Shell Programming and Scripting

Script to run command one by one

Hi, I have run a lot of commands one after one, but I can't run them simultaneous. One command has to run and when finished second command has to run etc. Also I would like to save all the outputs created by the commands in a file. The commands can sometimes take hours, so it is also... (10 Replies)
Discussion started by: misterx12345
10 Replies

3. Shell Programming and Scripting

Script for telnet and run one command kill it and run another command using while loop

( sleep 3 echo ${LOGIN} sleep 2 echo ${PSWD} sleep 2 while read line do echo "$line" PID=$? sleep 2 kill -9 $PID done < temp sleep 5 echo "exit" ) | telnet ${HOST} while is executing only command and exits. (5 Replies)
Discussion started by: sooda
5 Replies

4. Shell Programming and Scripting

How to run a shell script on a remote host using ftp

Hi, is there a way I can run a shell script through ftp on a remote host? The remote host doesn't have ssh running so I can't use ssh. (7 Replies)
Discussion started by: mrskittles99
7 Replies

5. Shell Programming and Scripting

How to run a script when i'm using FTP???

I have a script which i wanted to run after doing a ftp to the destination server?? How can i do do that??? (9 Replies)
Discussion started by: nikhil jain
9 Replies

6. Shell Programming and Scripting

script will not run cp command

Hi, Not sure what the issue is here, but when i run the script. A simple copy command, it does not find the cp command ? See scrpt below : #!/bin/sh set -x ############################################# # Backup Processes #... (4 Replies)
Discussion started by: venhart
4 Replies

7. Windows & DOS: Issues & Discussions

to run shell script using FTP

Hi All, From FTP prompt, How to run Unix Shell scripts? Thanks in Advance, (1 Reply)
Discussion started by: HemaV
1 Replies

8. Shell Programming and Scripting

Need help! command working ok when executed in command line, but fails when run inside a script!

Hi everyone, when executing this command in unix: echo "WM7 Fatal Alerts:", $(cat query1.txt) > a.csvIt works fine, but running this command in a shell script gives an error saying that there's a syntax error. here is content of my script: tdbsrvr$ vi hc.sh "hc.sh" 22 lines, 509... (4 Replies)
Discussion started by: 4dirk1
4 Replies

9. Shell Programming and Scripting

FTP run from shell script gives slow transfer rates

Hey everybody, this is my first post so be gentle. I have two Sun 5220's running Solaris 10 that are directly connected with a cross-over cable at Gig. One of these boxes is my production Oracle server which generates a 50GB dump file every evening at 10:50. The other Solaris is a devolopment... (8 Replies)
Discussion started by: Countificus
8 Replies

10. UNIX for Advanced & Expert Users

script to be run after every FTP transfer

Hello everyone, we are running VSFtpd as FTP Server on Redhat AS 5. I would like to have a script to be run immediately after every FTP transfer. Is is possible (or with any other FTP Server?). I thought of writing a script to monitor if FTP transfer happening and run the required-script... (2 Replies)
Discussion started by: prvnrk
2 Replies
Login or Register to Ask a Question