can any body correct the code


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users can any body correct the code
# 1  
Old 09-16-2005
can any body correct the code

#!/bin/ksh

LOG_DATE=`date +%Y%m`
export LOG_DATE
cd D:/Informatica/Informatica_share/SrcFiles/l

# mv SITE_ACTIVITY${LOG_DATE}*.CSV D:/Informatica/Informatica_share/SrcFiles/SITE_ACTIVITY${LOG_DATE}*.CSV

# mv SITE_ACTIVITY20050914114546.CSV D:/Informatica/Informatica_share/SrcFiles/SITE_ACTIVITY20050914114546.CSV

mv SITE_ACTIVITY${LOG_DATE}*.CSV D:/Informatica/Informatica_share/SrcFiles/SITE_ACTIVITY${LOG_DATE}*'.CSV'


ftp -inv <<EOF
open xyz.eng.abc.com
user hik klm
cd /opt/edocs/AV
# mget SITE_ACTIVITY${LOG_DATE}*.CSV
mget SITE_ACTIVITY${LOG_DATE}*.*
# mget SITE_ACTIVITY20050914114546.CSV
bye
EOF


My question is when I run the script with the file name specified in mget command it is able to FTP the file from unix to NT
If I substitute the variable in the file for the mget command it dosent ftp the file
I am invoking this script in Informatica

Please help me if any thing wrong in the script

Thank you
---vivek
# 2  
Old 09-16-2005
Can any body correct the code .

You are breaking the rules.

Edit.

Rules

(4) Do not 'bump up' questions if they are not answered promptly. No duplicate or cross-posting and do not report a post where your goal is to get an answer more quickly.

Last edited by vino; 09-16-2005 at 10:32 AM..
# 3  
Old 09-16-2005
What is that rule
Thank you

So How can I delete this thread
Thank you

Last edited by vivekanandarpat; 09-16-2005 at 10:57 AM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Same sed code prints(p) correct, but writtes(w) wrong output

Dear all, I am using sed as an alternative to grep in order to get a specific line from each of multiple files located in the same directory. I am using sed because it prints the lines in the correct order (unlike grep). When I write sed code that prints out the output I get it correct, but... (1 Reply)
Discussion started by: JaNaJaNa
1 Replies

2. UNIX for Dummies Questions & Answers

Sendmail with HTML body and attachment code issues

Hi, I was working on getting an HTML file in the mail body along with attaching a "csv" file to the mail. Below are the 2 parts of the code. I need help with the second part where I'm sending the mail. The HTML file as an attachment is perfect without any issues and with proper formatting.... (6 Replies)
Discussion started by: aster007
6 Replies

3. Shell Programming and Scripting

How to correct this awk code without eval?

Hi everyone, The following piece of awk code works fine if I use eval builtin var='$1,$2' ps | eval "awk '{print $var}'" But when I try to knock off eval and use awk variable as substitute then I am not getting the expected result ps | awk -v v1=$var '{print v1}' # output is $1,$2 ps |... (4 Replies)
Discussion started by: royalibrahim
4 Replies

4. Shell Programming and Scripting

Send correct exit code from child script back to parent

Hello all; hope someone can help me cause I am going crazy trying to find a solution for (what I think is simple) issue...looked hard up and down this forum and tried several "solutions" with no avail...so here's my issue: I have this (parent) script: copylsofdcmcadefttosftpwithmove.sh ... (3 Replies)
Discussion started by: gvolpini
3 Replies

5. Linux

Please correct me with my code?

Dear All On my Linux server, I need to separate the individual logs coming from various modules concurrently. Please find below a sample of the logs: But when I run it, I am receiving the following error: -bash: -f1.log : command not found -bash: $LOGFILE : ambiguous redirect Can you... (4 Replies)
Discussion started by: hadimotamedi
4 Replies

6. Shell Programming and Scripting

How to mail with this body

Hi, i have a file ABC, i want to mail the contents of this file and i want to make the body of the mail per my choice like this: Hi All, This is the Report for today. <Browse of the File ABC> i am using : mailx -s "Today's Report" abcd@xyz.com << EOT Hi All, This is... (1 Reply)
Discussion started by: Prat007
1 Replies

7. Shell Programming and Scripting

Please correct the code

Hi, Some part of output: ================ $ hwmgr show scsi SCSI DEVICE DEVICE DRIVER NUM DEVICE FIRST HWID: DEVICEID HOSTNAME TYPE SUBTYPE OWNER PATH FILE VALID PATH ------------------------------------------------------------------------- 68: ... (10 Replies)
Discussion started by: mansa
10 Replies

8. UNIX for Dummies Questions & Answers

can any body help me out on this...

Hi friends.. I am using the below command to search few files from many folders which is under one folder.. i mean let say the path is A/B/C...and inside C...i have 1-10 folder... the below command is working fine.... for i in 1 3 5 7; do find /A/B/C/${i} -name "*.txt" -o -name "*.csv"... (2 Replies)
Discussion started by: sapan123
2 Replies

9. Linux

Can any body tell me.

:(I want to install linux (SLES-9-SP4-CD-x86_64-GM-CD1) but it doesnot work. It said the computer is 32 bits you cannot use 64 bits on it. (3 Replies)
Discussion started by: sackNumchai
3 Replies

10. Shell Programming and Scripting

Can any body correct the code

#!/bin/ksh LOG_DATE=`date +%Y%m` export LOG_DATE cd D:/Informatica/Informatica_share/SrcFiles/l # mv SITE_ACTIVITY${LOG_DATE}*.CSV D:/Informatica/Informatica_share/SrcFiles/SITE_ACTIVITY${LOG_DATE}*.CSV # mv SITE_ACTIVITY20050914114546.CSV... (6 Replies)
Discussion started by: vivekanandarpat
6 Replies
Login or Register to Ask a Question