Sponsored Content
Full Discussion: Script not running properly
Top Forums UNIX for Dummies Questions & Answers Script not running properly Post 302169773 by chris1234 on Friday 22nd of February 2008 12:45:10 PM
Old 02-22-2008
Script not running properly

I created a script before which was this :-

Code:
 cd /mike/dataxfer
     for dir in *; do
     if [ -d ${dir}/priceops ]; then
     ssh -l abc nissan "mkdir -p  /mike/web/$dir"
     scp -r ${dir}/priceops nissan:mike/web/${dir}/
    fi
    done

exit 0

This script worked fine for me with no problem. It will do a recursive search if that priceops directory exist then it will create the parant directory and thew priceops folder in the remote machine (nissan) and then will do a scp to copy all the contents of that priceops folder. It worked fine.

But now they change the priceops folder to( Price Shops ) folder. so i changed my script to this:-

Code:
  PRICE_SHOPS="Price Shops"
     cd /mike/dataxfer
     for dir in *; do
     if [ -d ${dir}/$PRICE_SHOPS ]; then
     ssh -l abc nissan "mkdir -p /mike/web/$dir"
     scp -r ${dir}/$PRICE_SHOPS nissan:/mike/web/${dir}/
    fi
    done

exit 0

and it is not working for me neither i am getting any errors also. when i type
./file_transfer1.sh
to run my script i dont get any response of files transfered or any errors. What is wrong or anyone care to help?

Thanks
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

expr not outputting properly.. bsd sh script

When i run sh -x test.sh, expr outputs x=expr $x + 1 instead of doing the arithmetic.. been working on this overnight.. and its being a pain in the arse if you ask me.. :confused::confused: #!/bin/sh #script for downloading numerical filenames chap=1 p=1 count=0 x=1 while do if ... (2 Replies)
Discussion started by: aspect_p
2 Replies

2. Shell Programming and Scripting

cron does not execute script properly

I have a simple script that checks for certain printers and records them to a file. When I run the script manually at the command prompt, it works perfect, but when I run the script via cron, nothing happens. No errors reported, and no records are written out. I'm using Solaris 10. Below is the... (4 Replies)
Discussion started by: lmatlebyane
4 Replies

3. Shell Programming and Scripting

A script doesnt work properly when crontab

Hi, I have a script which does a tar and sends it to another server as backup. Script is as below # Locations to be backed up. Seperate by space BACKUP_LOCATIONS=/repos/subversion BACKUP_BASE_FOLDER=/bakpool BACKUP_FILE_NAME_ROOT=svn-backup START_TIME_DISP=`date` START_TIME=`date... (11 Replies)
Discussion started by: digitalrg
11 Replies

4. Shell Programming and Scripting

Script not running properly when run from Crontab

Hi I am a novice Linux/Perl user and am struggling to overcome what I am sure is a simple problem. I am using a perl program to create a shell script daily containing between 10 and 30 "at -f" commands for the same day. Then I change the file attributes to allow the file to be executed. When... (2 Replies)
Discussion started by: simoncjones
2 Replies

5. Homework & Coursework Questions

Script does not execute properly

I am trying to create a Unix script that when ran will provide a veiw of the files of the week that the user inputs, I have this one down. Then I would like them to be able to type in one of the files that is in that week and it displays that file. The script that I have keeps looping the week... (4 Replies)
Discussion started by: Goob
4 Replies

6. Shell Programming and Scripting

Shell Script Email not working Properly

Hi GURU's, I'm using a Shell Script to send email's as an attachment. I'm Storing the email address in a table and catching in a variable. MAILLIST=`noarg sqlplus -s $OraUsr << EOF set heading off set feedback off set echo off SELECT email_ids FROM tpemail_table WHERE... (9 Replies)
Discussion started by: karthikraj
9 Replies

7. Shell Programming and Scripting

script line not working properly

Hi , I am using the below command in script. $_IDLETIME is returning value if i execute the script manually. sar > $_LOCATION/sar.txt _IDLETIME=`tail -2 $_LOCATION/sar.txt | head -1 | tr -s ' ' ' ' | cut -d ' ' -f8 | cut -d '.' -f1`; if But it s not returning any value if it put the... (3 Replies)
Discussion started by: ahamed
3 Replies

8. Shell Programming and Scripting

Shell script not working properly

Hello, i have below shell script to process ftp get from server and create file list afte finish. this shell scipt has 6 parameter input. unfortunately, it is only working to get the file and terminated before creating file list. please help. thanks, #!/bin/ksh ## example usage :... (3 Replies)
Discussion started by: daryatmo
3 Replies

9. Shell Programming and Scripting

Script does not run properly

Hello everybody Im learning bash scrpting language and im making a script that read a file line by line and it does a comparison if in a line start with a letter or number and it will delete every ones that start with a letter. But im getting some errors First of all, this is the script's... (5 Replies)
Discussion started by: alienrunes
5 Replies

10. Shell Programming and Scripting

Process Instance not running properly.

I have run 10 instances of the process eg, process name is BG nohup /WP01IRB1_irbapp/IRBWPROD/RB/bin/BG -c 1 -t 23 -a '-caTop TESTBILLCYCLE='5FEB13_81PT19NPT''>a.txt & nohup /WP01IRB1_irbapp/IRBWPROD/RB/bin/BG -c 2 -t 23 -a '-caTop TESTBILLCYCLE='5FEB13_81PT19NPT''>b.txt & nohup... (3 Replies)
Discussion started by: ankitknit
3 Replies
tinydyndns-conf(8)					      System Manager's Manual						tinydyndns-conf(8)

NAME
tinydyndns-conf - sets up a pop-before-dyndns service SYNOPSIS
tinydyndns-conf acct logacct dir myip mydomain DESCRIPTION
tinydyndns-conf creates a service directory dir that runs tinydns(8), and a service directory dir/pop that runs a pop3 service and updates tinydns' database after a successful login. You can run the services under svscan(8) or runsvdir(8) by creating symbolic links in the /service directory: ln -s dir /service/dir ln -s dir/pop /service/dir-pop The service will start within five seconds, and will be restarted upon reboot. You can use svc(8) to control the service. tinydyndns-conf runs tinydns-conf acct logacct dir myip to set up a DNS publication service. tinydyndns-conf modifies dir/root/Makefile to not run tinydns-data(8) upon normal request. tinydyndns-conf arranges for tcpserver(1) to listen on TCP port 110, and to start pop3front-auth(8), cvm-pwfile(8), and after a successful login tinydyndns-update(8), and pop3front-maildir(8) upon connections. tinydyndns-conf creates a setpasswd script and a default passwd database in dir/pop for the use with cvm-pwfile(8). SEE ALSO
tinydyndns-update(8), tinydyndns-data(8), tinydns(8), tcpserver(1), pop3front-auth(8), cvm-pwfile(8), pop3front-maildir(8) http://smarden.org/tinydyndns/ AUTHOR
Gerrit Pape <pape@smarden.org> tinydyndns-conf(8)
All times are GMT -4. The time now is 09:58 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy