how to see function in shell


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users how to see function in shell
# 1  
Old 05-09-2006
how to see function in shell

Hi,

is there any way we can see user defined functions in a shell?


thanks in advance,
-Ashish
# 2  
Old 05-09-2006
For example, In Korn Shell:
Code:
typeset -f

lists the functions that are defined. I guess I should ask what shell?
# 3  
Old 05-10-2006
thanks a lot Jim. I use Korn shell.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Converting shell to Perl I run into shell built in function trap and need alternative in Perl

I am working on converting shell to Perl script. In shell we have built in function trap Do you know alternative in Perl or actually we don't need it? Thanks for contribution (3 Replies)
Discussion started by: digioleg54
3 Replies

2. Shell Programming and Scripting

How to dynamically name as function in shell?

Hi all, Does anyone know if it possible to append a parameter to a function name? Something like the following: function tnsrec_${SERVICE_NAME} { code.. } Any ideas? (6 Replies)
Discussion started by: jonnyd
6 Replies

3. Shell Programming and Scripting

How to call a function in Shell..?

#!/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)
Discussion started by: linuxadmin
5 Replies

4. Shell Programming and Scripting

function from shell input

Hi all i have the command called printer which needs a usernmae for example i would run the commnad printer <username> how can i write i quick script in perl that if the username is ab then write "denined" and if it is anything else it will work thanks Adam (1 Reply)
Discussion started by: ab52
1 Replies

5. Red Hat

how to call a particular function from one shell another shell script

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)
Discussion started by: ponmuthu
2 Replies

6. Shell Programming and Scripting

Function in Shell script

Legends, Can you please debug, what's wrong with the below code. I am gettng unexpected token error RebuldPF() ( #Changing the directory to data directory where the pf exists. cd /home/sandeep/files #Listing the names of the Pricefiles for rebuilding echo "The following pricefiles will... (6 Replies)
Discussion started by: sdosanjh
6 Replies

7. Shell Programming and Scripting

SHELL SCRIPT Function Calling Another Function Please Help...

This is my function which is creating three variables based on counter & writing these variable to database by calling another function writeRecord but only one record is getting wrote in DB.... Please advise ASAP...:confused: function InsertFtg { FTGSTR="" echo "Saurabh is GREAT $#" let... (2 Replies)
Discussion started by: omkar.sonawane
2 Replies

8. Shell Programming and Scripting

awk function from shell

Hi all. I have a selection of awk functions which I have written and tested in a main awk program. From the command line I use nawk -f function -f main to run main and call my functions from within it. I now wish to use these awk function again but want to call them from inside an awk section of... (1 Reply)
Discussion started by: pxy2d1
1 Replies

9. Shell Programming and Scripting

shell function help

SUN os KSH ERROR_CHK () { ERR_DATA="$ABC" if `echo "$ABC" | egrep 'PLS|ERROR|ORA'` ; then echo "Failed: Can't execute procedure ${PRG_NAME} ERROR found " return 1 else echo "Info : ${PRG_NAME} done" fi } my function fails iwth below message "ERROR: not found" I think i... (0 Replies)
Discussion started by: Amresh Dubey
0 Replies

10. Shell Programming and Scripting

getting the value of a c function in shell script

Let say there is a module fileselection module written in c language which returns the file name. Is it possible to get the file name from the file selection module directly, I mean can we call a c function directly in shell script without doing executable. If possible then how it can be... (1 Reply)
Discussion started by: surjyap
1 Replies
Login or Register to Ask a Question