LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-27-2013, 02:37 AM   #1
renuk
LQ Newbie
 
Registered: Dec 2013
Posts: 3

Rep: Reputation: Disabled
Run fast export with passing parameters through ksh


Hi,

i am trying to run .fe through ksh with parameter UNPROCESS/UNREGISTERED
but it is giving me error

PHP Code:
[B]if [ `$param` == "UNPROCESS" ]; then[/B]
cat ${DSADM_ROOT}/$senv/sql/GLMA_DW_FILE_EXPORT_TEMPLATE.fe|sed "s%{--}% %g"|sed "s%{TD_ABAC_DBNAME}%$TD_ABAC_DBNAME%g"|sed "s%{TD_ABAC_DBUSER}%$TD_ABAC_DBUSER%g"|sed "s%{TD_ABAC_DBPASS}%$TD_ABAC_DBPASS%g"|sed "s%{DSADM_ROOT}%$DSADM_ROOT%g"|sed "s%{senv}%$senv%g"|sed "s%{POLARIS_POS_LANDING_DIR}%$POLARIS_POS_LANDING_DIR%g"|sed "s%{TD_ABAC_LOGSCHEMA}%$TD_ABAC_LOGSCHEMA%g"|sed "s%{TD_ABAC_DBVIEW}%$TD_ABAC_DBVIEW%g"|sed "s%{JOB_SERIAL_NO}%${JOB_SERIAL_NO}%g" > ${POLARIS_POS_LANDING_DIR}/GLMA_DW_FILE_EXPORT_TEMPLATE_${JOB_SERIAL_NO}.fe
[B]elif [ `$param` == "UNREGISTERED" ]; then[/B]
cat ${DSADM_ROOT}/$senv/sql/GLMA_DW_FILE_EXPORT_TEMPLATE.fe|sed "s%{--}%--%g"|sed "s%{TD_ABAC_DBNAME}%$TD_ABAC_DBNAME%g"|sed "s%{TD_ABAC_DBUSER}%$TD_ABAC_DBUSER%g"|sed "s%{TD_ABAC_DBPASS}%$TD_ABAC_DBPASS%g"|sed "s%{DSADM_ROOT}%$DSADM_ROOT%g"|sed "s%{senv}%$senv%g"|sed "s%{POLARIS_POS_LANDING_DIR}%$POLARIS_POS_LANDING_DIR%g"|sed "s%{TD_ABAC_LOGSCHEMA}%$TD_ABAC_LOGSCHEMA%g"|sed "s%{TD_ABAC_DBVIEW}%$TD_ABAC_DBVIEW%g"|sed "s%{JOB_SERIAL_NO}%${JOB_SERIAL_NO}%g" > ${POLARIS_POS_LANDING_DIR}/GLMA_DW_FILE_EXPORT_TEMPLATE_${JOB_SERIAL_NO}.fe
fi

below is the query of .fe

SELECT DW_FILE_NA
FROM {TD_ABAC_DBVIEW}.V1DW_FILE
WHERE DW_DATA_TYP_ID IN (1,2,3,39,40,41,42,43,45,46,47,48)
AND FILE_DW_ARRV_TS > (current_date -5)
{--} AND DW_DATA_TYP_ID IN (10,11);
thanks!!
 
Old 12-27-2013, 03:11 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389
Which error?

This doesn't seem correct:
Code:
if [ `$param` == "UNPROCESS" ]; then
$param should be between double quotes and not backticks.
Code:
if [ "$param" == "UNPROCESS" ]; then
 
1 members found this post helpful.
Old 12-27-2013, 04:02 AM   #3
divyashree
Senior Member
 
Registered: Apr 2007
Location: bbsr,orissa,India
Distribution: RHEL5 ,RHEL4,CENT OS5,FEDORA,UBUNTU
Posts: 1,363

Rep: Reputation: 135Reputation: 135
What error you are getting ??

Also run this in your terminal directly:

Quote:
cat ${DSADM_ROOT}/$senv/sql/GLMA_DW_FILE_EXPORT_TEMPLATE.fe
Is it giving you the correct content of that file ?
 
Old 12-27-2013, 04:02 AM   #4
renuk
LQ Newbie
 
Registered: Dec 2013
Posts: 3

Original Poster
Rep: Reputation: Disabled
Smile

Thanks!!
Below was write one
if [ "$param" == "UNPROCESS" ]; then

Last edited by renuk; 12-27-2013 at 04:05 AM.
 
Old 12-27-2013, 04:05 AM   #5
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389
Quote:
Originally Posted by renuk View Post
Thanks
You're welcome.

BTW: Can you put up the [SOLVED] tag.
- above the first post -> Please Mark this thread as solved if you feel a solution has been provided.
- -or- -
- first post -> Thread Tools -> Mark this thread as solved
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Passing kernel parameters magicalshashank31 Linux - Newbie 3 08-17-2011 10:58 AM
[SOLVED] Passing parameters to script -help flea89 Linux - Newbie 4 03-13-2010 12:47 PM
Passing parameters to a makefile. kerenLinuxForum Linux - Software 3 09-01-2008 08:24 AM
passing parameters in string in C shifter Programming 8 04-11-2008 09:01 AM
need help passing parameters in C++ hedpe Programming 1 10-21-2007 10:58 AM


All times are GMT -5. The time now is 02:44 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration