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)
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)
#!/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)
hi everyone
i am trying to do this
bash> cat abc.sh
deepak()
{
echo Deepak
}
deepak
bash>./abc.sh
Deepak
so it is giving me write simply i created a func and it worked
now i modified it like this way
bash> cat abc.sh (2 Replies)
I've 2 shell scripts viz., CmnFuncs.ksh and myScript.ksh.
1st script contains all common functions and its code is as below:
$vi CmnFuncs.ksh
#!/bin/ksh
RunDate()
{
....
....
export Rundt=`date +%Y%m%d`
}
2nd script is invoking the above one and I expect to use the RunDt variable... (8 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)
Dear All,
I want to know how can i call oracle function from shell script code . My oracle function have around 5 input parameters and one return value.
for name in *.csv;
do
echo "connecting to DB and start processing '$name' file at "
echo "csv file name=$x"
sqlplus -s scoot/tiger <!... (2 Replies)
Hi, I am complete new to C programming and shell scripting. I just wrote a simple C code to calculate integral using trapezoid rule. I am prompting user to pass me No. of equally spaced points , N , upper and lower limit. My code looks as follows so far:
#include<stdio.h>
#include<string.h>... (2 Replies)
I am converting shell script to Perl. In shell I have a code
parse_prog_args()
{
if
then
while
do
case $1 in
-P* | -p* )
export PROCESS_DATE=$2
export MM=`echo $2 | cut -c5-6`
export DD=`echo $2 | cut -c7-8`
export YY=`echo $2 | cut -c3-4`
export... (4 Replies)
Discussion started by: digioleg54
4 Replies
LEARN ABOUT DEBIAN
ui::dialog::kde
UI::Dialog::KDE(3pm) User Contributed Perl Documentation UI::Dialog::KDE(3pm)NAME
UI::Dialog::KDE
SYNOPSIS
use UI::Dialog::KDE;
my $d = new UI::Dialog::KDE ( backtitle => 'Demo', title => 'Default',
height => 20, width => 65 ,
listheight => 5 );
# Either a KDialog or Xdialog msgbox widget should popup,
# with a preference for KDialog.
$d->msgbox( title => 'Welcome!', text => 'Welcome one and all!' );
ABSTRACT
UI::Dialog::KDE is simply another meta-class for UI::Dialog. This class simply has a different order of priority than UI::Dialog and no
console support.
DESCRIPTION
This class is simply a nice way to try and ensure a KDE based widget set. KDialog is the only kde dialog variant and as such, XDialog is
the only alternative.
EXPORT
None
INHERITS
UI::Dialog
CONSTRUCTOR
new( @options )
EXAMPLE
my $d = new( title => 'Default Title', backtitle => 'Backtitle',
width => 65, height => 20, listheight => 5,
order => [ 'kdialog', 'xdialog' ] );
DESCRIPTION
This is the Class Constructor method. It accepts a list of key => value pairs and uses them as the defaults when interacting with
the various widgets.
RETURNS
A blessed object reference of the UI::Dialog::KDE class.
OPTIONS
The (...)'s after each option indicate the default for the option.
debug = 0,1,2(0)
order = [ kdialog, xdialog ] (as indicated)
PATH = [ /bin, /usr/bin, /usr/local/bin, /opt/bin ] (as indicated)
backtitle = "backtitle" ('')
title = "title" ('')
beepbefore = 0,1(0)
beepafter = 0,1(0)
height = d+(20)
width = d+(65)
listheight = d+(5)SEE ALSO
PERLDOC
UI::Dialog
UI::Dialog::Backend
UI::Dialog::Backend::KDialog
UI::Dialog::Backend::XDialog
UI::Dialog::Backend::XOSD
MAN FILES
kdialog(1), osd_cat(1) and Xdialog(1)BUGS
Please email the author with any bug reports. Include the name of the module in the subject line.
AUTHOR
Kevin C. Krinke, <kckrinke@opendoorsoftware.com>
COPYRIGHT AND LICENSE
Copyright (C) 2003 Kevin C. Krinke <kckrinke@opendoorsoftware.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
perl v5.8.8 2004-08-01 UI::Dialog::KDE(3pm)