If there are no rows return by this function i want to stop my execution there and no email should be sent , but if some rows are retuned by this function i want to send a alert email , i tried using $? , but no luck , please help.
Last edited by Scott; 06-25-2012 at 02:26 AM..
Reason: Code tags
i have a function written in one shell script and i want to call that function in another shell script and use the value returned by that script.
can any one suggest me how can i do that?
regards,
Rajesh.P (4 Replies)
hi friends,
I writing a script, one of the function there is:
###################################
########### Return 1 if has subfolders and 0 otherwise ##################
# Get one Argument - Folder name
Has_Subfolders()
{
count=0
cd $1
for zont in `ls -l | grep drw | awk... (1 Reply)
hi friends,
I writing a script, one of the function there is:
###################################
########### Return 1 if has subfolders and 0 otherwise ##################
# Get one Argument - Folder name
Has_Subfolders()
{
count=0
cd $1
for zont in `ls -l | grep drw | awk... (4 Replies)
Hi
How to call a shell scripting through a Perl scripting? Actually I need some value from Shell scripting and passes in the Perl scripting. So how can i do this? (2 Replies)
Here is the following code :
1.
# gcc -c test firstprog.c
the above command will generate a executable file called "test " in which ever directory it is run.
Assuming It will also return a value.
2. In the below SCRIPT . test is a file generated by compiling a c program... (3 Replies)
please help me in this script
shell script :1
***********
>cat file1.sh
#!/bin/bash
echo "this is first file"
function var()
{
a=10
b=11
}
function var_1()
{
c=12
d=13 (2 Replies)
Hi all,
Actually my aim is to call the shell script when ever there is a hit in a mysql table which consist of 3 values. Acter some research I came to know that it is not possible and can achive with timestamp. Can someone please tell me how to read the table timestamp which should done... (3 Replies)
#!/bin/bash
FUN_ECHO(){
echo $1
}
FUN_ECHO "hi how are you ?"
This code will work fine.
BUT is it possible to make the following to work ?
FUN_ECHO "hi how are you ?"
FUN_ECHO(){
echo $1
}
I know that the code will be executed line by line. But i have a number of... (5 Replies)
I am getting Segmentation fault at below function call in my script:
get_x() {
sqlplus -s / <<end | grep KEEP | sed 's/KEEP//;s///g'
select 'KEEP' ,table_name from all_synonyms where upper(synonym_name)= '$1';
exit
end
x=$(get_x $1)
echo " SQL OUTPUT IS :: $x"
}
I am getting output of... (1 Reply)