LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-09-2009, 12:43 PM   #1
hari89
LQ Newbie
 
Registered: Sep 2009
Posts: 3

Rep: Reputation: 0
some changes


script is not running properly,some changes needed..


========================================================================

#!/bin/bash
cd /usr/sap/GD0/put/AbhiData
f_dir=`pwd`
f_date=`date --date="today" +%F | sed 's/-//g'`
f_name=abhidenialsapextended_delta$f_date.xml
f_host='ftp.abhi.com'
f_user='mkob'
f_passwd='2m'

ftp -n -v $f_host << FTP_EOF
user $f_user $f_passwd
bin
prompt
get $f_name
bye
FTP_EOF
====================================================================
modification which should be needed...on above script
======================================================================

1. AbhiData does not have updates after 8:00PM everyday. That is why script should run at 9:00 PM everyday and look for any delta file.
2. Download the new file from AbhiData to a temporary directory. The original file (which will be downloaded manually) is abhidenialSAPExtended.xml.zip but subsequent files will have a date stamp (ex: abhidenialsapextended_delta20080123.xml). The script should send an email alert if something goes wrong with the download (ex: can’t connect to FTP server, space issues, etc). Notes:
o AbhiData does not prepare new files every day so there will be days when there is no new file. If there is no new file then the script should end here without sending an email alert.
o The original abhidenialSAPExtended.xml.zip file will be loaded manually and does not need to be included in the script.
3. Copy the file from the temporary directory to the “in” directory renamed as “abhidenialsapextended.xml”. This should overwrite the existing “abhidenialsapextended.xml” file. There should always be a “abhidenialsapextended.xml” file in the in directory so the SAP batch job will not error out.
4. Move the file from the temporary directory to the “done” directory.
5. Weekly, a compare should be done between the files in the “done” directory and the files on the AbhiData server to make sure that no files are missing (files from AbhiData are “delta” loads – any missing files means our lists will be incomplete). An email alert would be sufficient – any missing files can be loaded manually.




Regards
hari
 
Old 09-09-2009, 02:03 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,633

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by hari89 View Post
script is not running properly,some changes needed..

Regards
hari
This is a duplicate post, and is the same thing you posted in another forum. Don't double-post things, especially if you're trying to get someone to do your work for you, for free.
 
  


Reply



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



LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:21 AM.

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
Open Source Consulting | Domain Registration