export repository shell script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting export repository shell script
# 1  
Old 09-13-2012
Lightbulb export repository shell script

Hi Forum,

I have script to export he Siebel repository. My requirment is to have a shell script in place so when placed in it in a cron it should generate the repsoitory dat file on date basis.

Script for export:

repimexp /a E /c UCM_ES_DEV2_DSN /u sadmin /p SADMIN /d siebel /r 'Siebel Repository' /f /opt/app/ucm/siebel_rep_12092012 /l /opt/app/ucm/export12092012.log

--->
So when the job runs on 13th September 2012 ...the repository file should be created as siebel_rep_13092012 and log file as export13092012.log


Thanks for your help ....Smilie
# 2  
Old 09-13-2012
Have you never used the date command?
This should be the change in your script:
Code:
dt=$(date +%d%m%Y)
repimexp /a E /c UCM_ES_DEV2_DSN /u sadmin /p SADMIN /d siebel /r 'Siebel Repository' /f /opt/app/ucm/siebel_rep_$dt /l /opt/app/ucm/export$dt.log

# 3  
Old 09-13-2012
hmm...I'm actually into CRM don't know much abt shell script. Thanks for your reply.

I'll put the script in file and test it now.

---------- Post updated at 01:39 PM ---------- Previous update was at 11:39 AM ----------

I just put it the above code in a file and executed it.

The out put is as follows -
-rw-r----- 1 sbldev dbas 3 Sep 13 02:13 export.log
-rw-r----- 1 sbldev dbas 833946 Sep 13 02:14 siebel_rep_

The date is missing in both the export.log file and dat file.

Please help...
# 4  
Old 09-13-2012
Which shell? System?
Try with dt=$(/usr/bin/date +%d%m%Y) or dt=$(/bin/date +%d%m%Y) or whatever your path to date command is.
# 5  
Old 09-13-2012
hi Gotham,

It works....perfect.

Thanks a lot
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Error: Cannot retrieve repository metadata (repomd.xml) for repository: InstallMedia.

Most of my commands are returning this error on RHEL 6 64 bit: Also I tried installing many sofwtares, but it fails to correctly work. For example I treid installing dos2unix: # rpm -ivh dos2unix-5.3.3-5.ram0.98.src.rpm 1:dos2unix warning: user mockbuild does not... (0 Replies)
Discussion started by: India_2014
0 Replies

2. Shell Programming and Scripting

Data export UNIX shell script

Hi, I want to write a shell script which connect to my database with the following credentials : User name : user PWD : rap_user_1 Hostname : app.Unix.Gsm1900.Org Port : 7862 SID : PTNC1 Once connected to DB i want to fetch data with the help of a SQL statement and expoet... (4 Replies)
Discussion started by: neeraj617
4 Replies

3. Shell Programming and Scripting

Export Error in Shell script

All, While executing the bellow commnad after the sed, awk command to export the value to, i am getting the fallowing error. line="_AABBB.EEEEEEE.LOG4JDISPLAY.PATH_=/apps/opt/abcde/pdstdsd/esapp/apadsfasdf/logadsfasdf.xml" keystring=`echo $line | awk -F"=" '{ print $1 }'`... (1 Reply)
Discussion started by: jothi basu
1 Replies

4. Shell Programming and Scripting

Export data from database in Excel sheet with the help of Shell script and automated the report

Export data from database in Excel sheet with the help of Shell script and automated the report every day in the mornig. (1 Reply)
Discussion started by: neeraj617
1 Replies

5. Shell Programming and Scripting

Shell script to export data from Oracle table .

Hi, I want to write a shell script which will export data from oracle table . I don't want to save that data . I want the queries . Right now i am right clicking on the table and clicking on export as to my desktop . Please let me know if any one have any idea . (2 Replies)
Discussion started by: honey26
2 Replies

6. Shell Programming and Scripting

Use of export from a shell script..

Hi All, I am facing a problem while trying to export path variables from a script. Here's my situation 1. I have a script in which i have defined all the path variables to be exported: export ORACLE_HOME=/path/to/bin/ export NG_USER_HOME=/path/to/bin/ etc.... 2. I have another shell... (4 Replies)
Discussion started by: raghu_shekar
4 Replies

7. Shell Programming and Scripting

Set/Export Env Vars from with Shell Script With Input Variable

I have a shell script I want to run that will set environment variables based on the value of an input variable submitted when the shell script is called. For example: $ mgenv.sh prod This would set environment variables for prod $ mgenv.sh test This would set environment variables... (1 Reply)
Discussion started by: brtaylor73
1 Replies

8. Shell Programming and Scripting

Export to Microsoft excel using shell script

I have requirement where i have to export the data extracted from a flat file to a microsoft excel sheet. If the awk returns multiple records then all these records should go in into different rows of same column in excel. Eg. say data returned by excel is A,B,C,D then these 4 records should go... (1 Reply)
Discussion started by: goutam_igate
1 Replies

9. Shell Programming and Scripting

problem running shell script (for oracle export) in crontab

Hello Gurus, I've been tasked with solving a problem at my new job and I'm stumped. We've got a script that dynamically builds an oracle export parameter files and then runs export from the shell. it runs fine when using the shell, but will NOT run (fails in one spot everytime) when entered... (1 Reply)
Discussion started by: jsheehan223
1 Replies

10. Shell Programming and Scripting

help for writing shell script to export table data

Hi All, I need to write a shell script(ksh) to take the tables backup in oracle(exporting tables data). The tables list is not static, and those are selecting through dynamic sql query. Can any body help how to write this shell script. Thanks, (3 Replies)
Discussion started by: sankarg
3 Replies
Login or Register to Ask a Question