05-08-2008
test for function name?
Hi,
I found this:
https://www.unix.com/unix-advanced-ex...ion-shell.html
which indicates I can use typeset -f to list the functions.
But it also lists the contents of the functions. Is there a
lighter weight way to see what is defined? Is there an
internal array with the function names? Perhaps there is
a conventional idiom out there for asking your program if a
a particular function name is defined?
Thx.
:-D
8 More Discussions You Might Find Interesting
1. Programming
Hi everyone ,
Is there any predefined C function that tests whether an input is string or an integer?
Thank's in advance :) (3 Replies)
Discussion started by: qqq
3 Replies
2. Shell Programming and Scripting
I need to write a function that will work in sh/ksh shell that will test to see if a file has already been opened for writting by another user
has anyone written something like this? (3 Replies)
Discussion started by: johnsonbryce
3 Replies
3. Programming
Hi everybody,
I need to check in C program whether a given login is known on the system. Is there any system function that could do this ?
So far, all I could find is getpwnam(), which answers my problem by parsing the local password database. But won't work if a user is authenticated by... (2 Replies)
Discussion started by: xavier054
2 Replies
4. Shell Programming and Scripting
This is the code:
while test 1 -eq 1
do
read a
$a
if test $a = stop
then
break
fi
done
I read a command on every loop an execute it.
I check if the string equals the word stop to end the loop,but it say that I gave too many arguments to test.
For example echo hello.
Now the... (1 Reply)
Discussion started by: Max89
1 Replies
5. Shell Programming and Scripting
How to check weather a string is like test* or test* ot *test* in if condition (5 Replies)
Discussion started by: johnjerome
5 Replies
6. Shell Programming and Scripting
I have found a code some where, which looks like
if (test $value)
then
<do something>
fi
I am not understanding what is test doing here. I have seen test with !,-eq, -e etc.
But, the above appears to be a new one to me.
Can anyone please expalin me. (4 Replies)
Discussion started by: mady135
4 Replies
7. Shell Programming and Scripting
i am writing the following snippet and cannot figure out why the variable measType remains 0. it should be 1
I also tried "\#analog" and '\#analog' in the test statement and it still doesn't work. What is going on?
bash$ measType=0
bash$ read line < 2iconfig.ini
bash$ echo $line
#analog... (4 Replies)
Discussion started by: oahmad
4 Replies
8. Shell Programming and Scripting
Hello everyone,
I have written simple script below to check if ip is added to interface
#!/usr/local/bin/bash
IFCONFIG="/sbin/ifconfig"
SERVICE="/usr/sbin/service"
IP="79.137.X.X"
GREP=$(${IFCONFIG} | grep ${IP})
ip_quantity_check () {
echo ${GREP} | wc -l
}
if ];... (2 Replies)
Discussion started by: bryn1u
2 Replies
LEARN ABOUT DEBIAN
ftpstats
FTPSTATS(8) System Manager's Manual FTPSTATS(8)
NAME
ftpstats - FTP Log summarizer
SYNOPSIS
ftpstats [options]
DESCRIPTION
Ftpstats dissects the defined ftp log and reports various statistics as requested. This manual page was written for the Debian GNU/Linux
distribution because the original program does not have a manual page.
OPTIONS
-f filename
Use filename rather than the default /var/log/xferlog
-r Include real users.
-a Include anonymous users.
-h Include report on hourly traffic.
-d Include report on domain traffic.
-t Report on total traffic by section.
-i Report on incoming traffic only (uploads).
-o Report on outgoing traffic only (downloads).
-Ddomain
Report only on traffic from domain This option leads to problems with the local domain: e.g. test.com is encountered under test and
not recognized under com, -D com will give you only stats about com excluding test.com! Use -A com for correct results.
-Aaddress
Report only on traffic from addresses whose end matches address e.g. -A test.domain.com will report on address ending with
test.domain.com
-ldepth
Depth of path detail for sections
-ssection
Section to report on. e.g. -s /pub will report only on paths under /pub
BUGS
No known bugs at this time. If you discover any bugs, please report at http://bugs.proftpd.org/ For help/support, try the ProFTPD mailing
lists, detailed on http://www.proftpd.org/lists.html
SEE ALSO
proftpd(8),proftpd.conf(5),xferlog(5)
AUTHORS
ProFTPD is written and maintained by a number of people, full credits can be found on http://www.proftpd.org/credits.html
CREDITS
This manual page was written by Francesco P. Lovergine <frankie@debian.org> and other Debian developers, for the Debian GNU/Linux system
(but may be used by others).
Please use the most appropriate mailing list listed on http://www.proftpd.org/lists.html for ftpstats related comments.
Debian GNU/Linux October 30, 2002 FTPSTATS(8)