Hi Erman,
I have to develop a script in unix for sqlloader
The requirements is as shown below
1. ctl and sql files are in /home/archicom/
Attached samples for type SMS
MOBILE_SMS.ctlmobile_SMS.sql2. when file reaches /archicom/data/chrg/ --> cat 'files' of same type (SMS, VOICE, etc) in one file.unl
just after that mv that files which have been cat to folder /archicom/data/arch/chrg/'FILES' ( SMS,VOICE, DATA, etc)
--> run .ctl script(sqlloader) using:
sqlldr archicom/archicom control=MOB_SMS.ctl errors=1000000
Can you please help me with the script?
To cat files of same type(e.g SMS) to one file (unl), how do I modify my script to scan the directory for type SMS and append to a unl file?
for file in /archicom/data/chrg/*SMS*
do
cat $file>output.unl;
mv $file /archicom/data/arch/chrg/;
doneAfter the cat process, and moving the files to /arch/chrg, how do I automatically append the unl file to ctl script so that it would load all the data for SMS in database?
Thanks,
Roshan