Sponsored Content
Top Forums Shell Programming and Scripting Calling shell functions from another shell script Post 302181788 by jisha on Friday 4th of April 2008 06:06:17 AM
Old 04-04-2008
CPU & Memory

I have done a bit more research.
I know this is not possible especially with arguments. but still there should be a way out ..

JS
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Calling shell script ?

hi friends, i'm new to unix and straight away i had to start with the script files. I've a script file which gets called from a menu item on a GUI. This script file again calls .awk file, in performing some tasks , which also generates certain files. I modified the files to generate some... (1 Reply)
Discussion started by: Ravi_Kandula
1 Replies

2. Shell Programming and Scripting

Shell script functions

Simple shell script : date test_fn() { echo "function within test shell script " } on the shell prompt I run > . test Then I invoke the function on the command line as below : test_fn() It echos the line function within test shell script and works as expected. ... (5 Replies)
Discussion started by: r_subrahmanian
5 Replies

3. Shell Programming and Scripting

Creating functions in shell script

hi friends, I am working with shell commands and all these works properly. Then i created a small function which includes these commands. Now the problem arises. When the commands are run by calling this fuction.it shows error. Why i am not able to run the unix command inside a function.... (1 Reply)
Discussion started by: gjithin
1 Replies

4. Shell Programming and Scripting

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

5. Shell Programming and Scripting

Calling another shell script

Hi there, I have an script reading content of a file and runs whatever command is specified there, as follows #!/bin/bash # Supposed to read from a file that commands are listed to be run # when the server starts for initialization CMD_FILE=/myScripts/startup/task2do.txt if ; then ... (2 Replies)
Discussion started by: james gordon
2 Replies

6. Shell Programming and Scripting

using library functions in shell script

hey guys, i made up a library file called common.lib so as to reuse the same code without typing it again. here is the code. its pretty basic . ## This is the second function compare() { file1 = $1 file2 = $2 cmp $file1 $file2 if then echo "comparison is possible"... (1 Reply)
Discussion started by: Irishboy24
1 Replies

7. Shell Programming and Scripting

calling 'n' number of shell scripts based on dependency in one shell script.

Hello gurus, I have three korn shell script 3.1, 3.2, 3.3. I would like to call three shell script in one shell script. i m looking for something like this call 3.1; If 3.1 = "complete" then call 3.2; if 3.2 = ''COMPlete" then call 3.3; else exit The... (1 Reply)
Discussion started by: shashi369
1 Replies

8. 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

9. Shell Programming and Scripting

Functions in a shell script

so i have a very big script that has the following format: functionA () { .... ... .... } Results=$(functionA) the code inside of functionA is very huge. so by the time the script gets to the "Results=" part, several seconds have already passed. the script is about 15MB in size.... (4 Replies)
Discussion started by: SkySmart
4 Replies

10. UNIX for Beginners Questions & Answers

How to find C programming functions using shell script?

I want to find c function definition with pattern with shell script by checking condition for each line: data_type functionname(param_list){ .... } I knew cscope or ctag is usable for this task, but if there any ways to do without using them. I am thinking of checking line condition... (3 Replies)
Discussion started by: cmdcmd
3 Replies
NDB(8)							      System Manager's Manual							    NDB(8)

NAME
query, mkhash, mkdb, cs, csquery, dns, dnsquery - network database SYNOPSIS
ndb/query attr value [ rattr ] ndb/mkhash file attr ndb/cs [ -n ] [ -f dbfile ] ndb/csquery ndb/dns [ -s ] [ -f dbfile ] ndb/dnsquery ndb/mkdb DESCRIPTION
The network database holds administrative information used by network programs such as bootp(8), ipconfig(8), con(1), etc. Ndb/query searches the database for an attribute of type attr and value value. If rattr is not specified, all entries matched by the search are returned. If rattr is specified, the value of the first pair with attribute rattr of all the matched entries is returned. Ndb/mkhash creates a hash file for all entries with attribute attr in database file file. The hash files are used by ndb/query and by the ndb library routines. Ndb/cs is a server used by dial(2) to translate network names. Option -f supplies the name of the data base file to use, default /lib/ndb/local. It is started at boot time. It finds out what networks are configured by looking for /net/*/clone when it starts. It can also be told about networks by writing to /net/cs a message of the form: add net1 net2 ... Ndb/cs also sets the system name in /dev/sysname if it can figure it out. Option -n causes cs to do nothing but set the system name. Ndb/csquery can be used to query ndb/cs to see how it resolves addresses. Ndb/csquery prompts for addresses and prints out what ndb/cs returns. Ndb/dns is a server used by ndb/cs and by remote systems to translate Internet domain names. Ndb/dns is started at boot time. By default dns serves only requests written to /net/dns. Option -s causes the server to also answer domain requests sent to UDP port 53. Name reso- lution is performed by searching the local database and by querying remote servers. The server for a domain is indicated by a database entry containing both a dom and a ns attribute. For example, the entry for the Internet root is: dom= ns=ns.nic.ddn.mil ns=kava.nisc.sri.com ns=aos.brl.mil The root of a domain subtree served by the local database is indicated by an entry with an soa attribute. For example, the AT&T research domain is: dom=research.att.com soa mb=ches.research.att.com ns=inet.research.att.com ns=research.research.att.com Here, the mb entry is the mail address of the person responsible for the domain (default postmaster). Wild-carded domain names can also be used. For example, to specify a mail forwarder for all AT&T research systems: dom=*.research.att.com mx=research.att.com Ndb/dnsquery can be used to query ndb/dns to see how it resolves requests. Ndb/dnsquery prompts for commands of the form domain-name request-type where request-type can be ip, mx, ns, cname, ptr.... In the case of the inverse query type, ptr, dnsquery will reverse the ip address and tack on the .in-addr.arpa for you. Ndb/mkdb is used in concert with awk(1) scripts to convert uucp systems files, IP host files, and Datakit configuration files into database files. It is very specific to the situation at Murray Hill. When the database files change underfoot, ndb/cs and ndb/dns track them properly. Nonetheless, to keep the database searches efficient it is necessary to run ndb/mkhash whenever the files are modified. It may be profitable to control this by a frequent cron(8) job. EXAMPLES
% ndb/query sys helix sys=helix dom=helix.research.att.com bootf=/mips/9powerboot ip=135.104.117.31 ether=080069020427 dk=nj/astro/helix proto=il % ndb/query sys helix ip 135.104.117.31 % ndb/dnsquery > 9net.research.att.com ip 9net.research.att.com ip 192.20.225.252 > 192.20.225.252 ptr 252.225.20.192.in-addr.arpa ptr 9net.research.att.com > FILES
/lib/ndb/local first database file searched /lib/ndb/local.* hash files for /lib/ndb/local /srv/cs service file for ndb/cs /net/cs where /srv/cs gets mounted /srv/dns service file for ndb/dns /net/dns where /srv/dns gets mounted SOURCE
/sys/src/cmd/ndb SEE ALSO
ndb(2) ndb(6) NDB(8)
All times are GMT -4. The time now is 03:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy