Calling Functions of Other K Shell Program


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Calling Functions of Other K Shell Program
# 1  
Old 11-12-2008
Calling Functions of Other K Shell Program

Hi,
I have a K shell
a.ksh

function abc {
// Some logic
}

In
b.ksh
i have included the a.ksh
./a.ksh

I want to call the abc function from this b.ksh script.


Thanks
Vijay
# 2  
Old 11-12-2008
source the ./a.sh:
Code:
. ./a.sh

# 3  
Old 11-12-2008
Thanks

Thanks a lot.....
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Calling Bash Functions in the BG

I'm trying to call some functions in the background so that I can multitask in this script. Not working so hot. The functions I call don't ever seem to get called. I'm doing it the exact same way in another script and it's working like a champ so I'm very confused. Here's a pretty simple repro: ... (7 Replies)
Discussion started by: stonkers
7 Replies

2. AIX

Calling functions from main program from dlopened library function

Hello All, I am trying to call a function from the calling main program from a dlopened library function, below is the entire code, when I execute it it crashes with sigill. Can you guys help me out I guess I am missing out on the linker flag or something here. besides I am new to AIX and... (1 Reply)
Discussion started by: syedtoah
1 Replies

3. Shell Programming and Scripting

Is it possible make the shell read functions 1 by 1 and calling an other function?

Greetings, I m wondering if it's possible do do the following : I have a simple function called "FindMoveDelete" which does the following : FindMoveDelete() { find . -iname "$FILENAME*.ext" -exec mv {} "$PATH/$VAR" \; && find . -maxdepth 1 -type d -iname "$FILENAME*" -exec rm -rf {}... (6 Replies)
Discussion started by: Sekullos
6 Replies

4. Shell Programming and Scripting

Calling perl script in shell program

How to call a perl script in shell program / shell scripting. PLS HELP ME (2 Replies)
Discussion started by: hravisankar
2 Replies

5. Programming

Calling a shell script from a C program

Hi, I have a shell script which connects to a database and fetches the count of the records from a table. I want to embed this whole script in a C program. Also the count fetched should be available in the C program for further usage. Please let me know how this can be done. Thanks (9 Replies)
Discussion started by: swasid
9 Replies

6. Shell Programming and Scripting

Calling a shell script from a C program

Hi, I have a shell script which connects to a database and fetches the count of the records from a table. I want to embed this whole script in a C program. Also the count fetched should be available in the C program for further usage. Please let me know how this can be done. Thanks ... (0 Replies)
Discussion started by: swasid
0 Replies

7. Shell Programming and Scripting

Run shell script from C program by calling fork and execl

I need to write a c program that uses the fork and excel system calls to run the shell script mode invoked like this: "./mode 644 ls -l" (that is the argumetns will always be 644 ls -l) here's the mode script: #!/bin/sh octal="$1" shift find . -maxdepth 1 -perm $octal -exec $@ {} \; ... (3 Replies)
Discussion started by: computethis
3 Replies

8. Shell Programming and Scripting

calling a program (w/ params) from within shell

Hi all, I need to call some script (s1) from within my shell script (s2). s1 accepts parameters and I want to feed it with values of params from my script. I tried many things but none work (I am so much of a beginner), please help one of my attempts : . . . param1="hehe" param2="haha" ... (12 Replies)
Discussion started by: Lorna
12 Replies

9. Shell Programming and Scripting

Calling shell functions from another shell script

Hi, I have a query .. i have 2 scripts say 1.sh and 2.sh 1.sh contains many functions written using shell scripts. 2.sh is a script which needs to call the functions definded in 1.sh function calls are with arguments. Can some one tell me how to call the functions from 2.sh? Thanks in... (6 Replies)
Discussion started by: jisha
6 Replies

10. Shell Programming and Scripting

Calling SHELL script from C program

Hi, I just tried to call a simple script from a pretty simple C program. I could not succeed :-( a message was thrown saying "sh: line 1: "Script name with path": Permission denied" The C program and shell script are below, both are in the same directory and shell script is given... (7 Replies)
Discussion started by: Chanakya.m
7 Replies
Login or Register to Ask a Question