Sponsored Content
Top Forums Shell Programming and Scripting shell scripts do not exit once completed Post 302690061 by guddu_12 on Wednesday 22nd of August 2012 12:08:10 PM
Old 08-22-2012
Quote:
Originally Posted by Shirishlnx
Pls try below ..

Code:
myfun () { 
sqlplus -S ERS_SRC/ERS_SRC@ERS11G << EOF
select sysdate from dual;
EOF
}
myfun;

Thx!
Shirish
Hi I have put the code in my scripts but it gives me error
./load_rio.sh[58]: syntax error at line 59 : `<<' unmatched

Code:
dbpart () { 
sqlplus -S ERS_SRC/ERS_SRC@ERS11G << EOF
exec PROC_PARTITION_MGMNT;
EOF
}
dbpart;

my actual scripts is
Code:
cd /ersdg3/ERS/ERS_INPUT_LOGS/RIO/LOGS/$NEWDIR
#test -e *.LOG $1
#       if [$? ne 0]; then
        if [ -f *.LOG ]
        then
        for i in *.LOG
        do
                flnm=$i
                #echo "file name is $flnm"
        #sed  "s:e:$flnm{i}:g" /ersdg3/ERS/ERS_INPUT_LOGS/RIO/control/control.ctl > /ersdg3/ERS/ERS_INPUT_LOGS/RIO/control/controlnew.ctl
        sed "s/FILENAME/$flnm/g" /ersdg3/ERS/ERS_INPUT_LOGS/RIO/control/rio.ctl > /ersdg3/ERS/ERS_INPUT_LOGS/RIO/control/rionew.ctl
                echo " ...............Connecting......................"
                        #......Run sql loader to load data in oracle database..................
        sqlldr ERS_SRC/ERS_SRC@ERS11G control = /ersdg3/ERS/ERS_INPUT_LOGS/RIO/control/rionew.ctl data = $flnm
                #.....Add the file to .zip file.........
                mv $flnm /ersdg3/ERS/ERS_INPUT_LOGS/RIO/rio_archive/$NEWDIR
                echo "files have been loaded .... $flnm"
        done
                echo ".....Please wait ..Zipping the logs file..."
##zip -r /ersdg3/ERS/ERS_INPUT_LOGS/RIO/rio_archive/$NEWDIR . -i *.LOG
        else
                echo "Files doesnt exist"
        fi
        if [ -f *.TXT ]
        then
                sqlldr ERS_SRC/ERS_SRC@ERS11G control = /ersdg3/ERS/ERS_INPUT_LOGS/RIO/control/rio_rec_cnt.ctl data = RIO_AUDIT_REC.TXT
        else
                echo "Files doesnt exist"
       fi
       mv RIO_AUDIT_REC.TXT /ersdg3/ERS/ERS_INPUT_LOGS/RIO/rio_archive/$NEWDIR
# Create oracle partiton for every data once loader load the data
        dbpart () {
                sqlplus -S ERS_SRC/ERS_SRC@ERS11G << EOF
                exec PROC_PARTITION_MGMNT;
                EOF
        }
        dbpart;

please let me know what is the issue
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

exit status of Invoking two or more scripts in background

I have a sript which is going to trigger other 3 scripts in background simultaneously for eg: Main Script:(main.sh) ----------- sh a.sh & sh b.sh & sh c.sh & How to catch the exit status and store it in a variable for all those three scripts in main script. Is there any other way of... (4 Replies)
Discussion started by: Omkumar
4 Replies

2. AIX

Difference between writing Unix Shell script and AIX Shell Scripts

Hi, Please give me the detailed Differences between writing Unix Shell script and AIX Shell Scripts. Thanks in advance..... (0 Replies)
Discussion started by: haroonec
0 Replies

3. Shell Programming and Scripting

exit a shell script!!

could somebody tell me please how to exit a shell script: if then echo "No arguments detected" exit 1 fi ... echo "still there" # is displayed .. :-( (4 Replies)
Discussion started by: sami98
4 Replies

4. Shell Programming and Scripting

How to pass parameter from sqlplus(procedure completed) to your shell script

if then # mail -s "Import failed file does not exist" sanjay.jaiswal@xyz.com echo "FILE does not exist" exit 1 fi echo "FILE EXIST" size=-1 set $(du /export/home/oracle/nas/scott21.dmp.gz) while do echo "Inside the loop" size=$1 set $(du... (1 Reply)
Discussion started by: sanora600
1 Replies

5. Shell Programming and Scripting

check exit status of bg scripts

HI All, I am running one shell script, in that script i am calling 4 scripts in the background. abc.ksh & efg.ksh & xky.ksh & mno.ksh & please let me know, how could i find the success and failure of each script. i Cannot use $?, because i want to run all the scripts in parellel. ... (2 Replies)
Discussion started by: javeed7
2 Replies

6. Shell Programming and Scripting

calling 'n' number of shell scripts based on dependency in one shell script.

Hello gurus, I have three korn shell script 3.1, 3.2, 3.3. I would like to call three shell script in one shell script. i m looking for something like this call 3.1; If 3.1 = "complete" then call 3.2; if 3.2 = ''COMPlete" then call 3.3; else exit The... (1 Reply)
Discussion started by: shashi369
1 Replies

7. Shell Programming and Scripting

Java hangs even though shell script’s execution is completed

I'm trying to execute a script from within my java code. The execution of the script is over(it's pid is no more), but java is stuck on waitFor() method of the shell script process!. And yes, I'm reading output and error streams in 2 separate threads. Yes, they are being joined at the end(after... (0 Replies)
Discussion started by: pavanlimo
0 Replies

8. Homework & Coursework Questions

completed scripts

Does anyone know any websites where there are finished scripts, can be for anything Just want to copy and paste it and manipulate into something I could use. danke schon (0 Replies)
Discussion started by: cpcp1988
0 Replies

9. Shell Programming and Scripting

[BASH] Script to manage background scripts (running, finished, exit code)

Heyas, Since this question (similar) occur every now and then, and given the fact i was thinking about it just recently (1-2 weeks) anyway, i started to write something :p The last point for motivation was... (17 Replies)
Discussion started by: sea
17 Replies
Locale::Codes::LangExt(3)				User Contributed Perl Documentation				 Locale::Codes::LangExt(3)

NAME
Locale::Codes::LangExt - standard codes for language extension identification SYNOPSIS
use Locale::Codes::LangExt; $lext = code2langext('acm'); # $lext gets 'Mesopotamian Arabic' $code = langext2code('Mesopotamian Arabic'); # $code gets 'acm' @codes = all_langext_codes(); @names = all_langext_names(); DESCRIPTION
The "Locale::Codes::LangExt" module provides access to standard codes used for identifying language extensions, such as those as defined in the IANA language registry. Most of the routines take an optional additional argument which specifies the code set to use. If not specified, the default IANA language registry codes will be used. SUPPORTED CODE SETS
There are several different code sets you can use for identifying language extensions. A code set may be specified using either a name, or a constant that is automatically exported by this module. For example, the two are equivalent: $lext = code2langext('acm','alpha'); $lext = code2langext('acm',LOCALE_LANGEXT_ALPHA); The codesets currently supported are: alpha This is the set of three-letter (lowercase) codes from the IANA language registry, such as 'acm' for Mesopotamian Arabic. This is the default code set. ROUTINES
code2langext ( CODE [,CODESET] ) langext2code ( NAME [,CODESET] ) langext_code2code ( CODE ,CODESET ,CODESET2 ) all_langext_codes ( [CODESET] ) all_langext_names ( [CODESET] ) Locale::Codes::LangExt::rename_langext ( CODE ,NEW_NAME [,CODESET] ) Locale::Codes::LangExt::add_langext ( CODE ,NAME [,CODESET] ) Locale::Codes::LangExt::delete_langext ( CODE [,CODESET] ) Locale::Codes::LangExt::add_langext_alias ( NAME ,NEW_NAME ) Locale::Codes::LangExt::delete_langext_alias ( NAME ) Locale::Codes::LangExt::rename_langext_code ( CODE ,NEW_CODE [,CODESET] ) Locale::Codes::LangExt::add_langext_code_alias ( CODE ,NEW_CODE [,CODESET] ) Locale::Codes::LangExt::delete_langext_code_alias ( CODE [,CODESET] ) These routines are all documented in the Locale::Codes::API man page. SEE ALSO
Locale::Codes The Locale-Codes distribution. Locale::Codes::API The list of functions supported by this module. http://www.iana.org/assignments/language-subtag-registry The IANA language subtag registry. AUTHOR
See Locale::Codes for full author history. Currently maintained by Sullivan Beck (sbeck@cpan.org). COPYRIGHT
Copyright (c) 2011-2013 Sullivan Beck This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.16.3 2013-02-27 Locale::Codes::LangExt(3)
All times are GMT -4. The time now is 02:44 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy