04-09-2012
The return statement can be used to return a value. Note that s=s convert(N[i]) " " is a concatenated assignment to variable s, consisting of 3 strings: s, convert(N[i]) , and a space
Last edited by Scrutinizer; 04-09-2012 at 04:42 AM..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
HELP!!!! I am in an on-line shell programming class and have a question. Here is the data:
Mike Harrington:(510) 548-1278:250:100:175
Christian Dobbins:(408) 538-2358:155:90:201
Susan Dalsass:(206) 654-6279:250:60:50
(There are 12 contribuors total)
This database contains names, phone... (1 Reply)
Discussion started by: NewbieGirl
1 Replies
2. UNIX for Dummies Questions & Answers
I want to add a new IP service which executes a script on SCO OS5.
I have amended /etc/services and added to port number (3333)
I have amended /etc/inetd.conf and added a line for this service but I can't get it to execute my own shell script
When I telnet to the IP address on port 3333 I... (1 Reply)
Discussion started by: markdrury
1 Replies
3. Shell Programming and Scripting
Dear Friends,
I need a help regarding User defined function in shell script.
My problem is as follows:
my_func.sh
my_funcI(){
grep 'mystring' I.dat
}
my_funcQ(){
grep 'mystring' Q.dat
}
myfuncI
myfuncQ
But As both the function has same function only the... (11 Replies)
Discussion started by: user_prady
11 Replies
4. Shell Programming and Scripting
Hello Friends,
Is it possible to return an array from a user defined function in awk ?
example:
gawk '
BEGIN{}
{
catch_line = my_function(i)
print catch_line
print catch_line
print catch_line
}
function my_function(i)
{
print "echo"
line= "awk"
line= "gawk"... (2 Replies)
Discussion started by: user_prady
2 Replies
5. UNIX and Linux Applications
Segregated the problematic portion, and showing for your view here.,
1. Following is the function definition,
create or replace function new_del(id integer) returns void as $$
begin
raise info 'dollar :%',$1;
delete from testing where id=$1;
end ;
$$
language 'plpgsql';
... (1 Reply)
Discussion started by: thegeek
1 Replies
6. Shell Programming and Scripting
I guess what I mean is: is there something like unalias to clear functions defined by sourcing a script or config/alias file from memory?
Is it necessary to start a new terminal session, or can it be done with a command? I tried "function somefunc {}" but bash told me it hit an "unexpected... (0 Replies)
Discussion started by: SilversleevesX
0 Replies
7. Shell Programming and Scripting
Hello to all,
I am looking for a way to display only the names of function (calls & definition) of a C++ source code.There is already a post related to this, but the script is to find the functions using a specific variable, and the replies are not that convincing since they cannot be used for... (2 Replies)
Discussion started by: frozensmilz
2 Replies
8. Shell Programming and Scripting
Hello,
Can anyone guide me tin passing parameters into user defined function of shell script (KSH).
Here is my code,
InsertRecord()
{
DB_TBL=$(sqlplus $USERID/$PASSWORD@$DATABASE << EOF
set head off
set feed off
set serveroutput on
INSERT INTO TBL1 ( OLD_VAL,
NEW_VAL,
... (7 Replies)
Discussion started by: Poonamol
7 Replies
9. UNIX for Dummies Questions & Answers
Hi, i would like to create user defined commands.
e,g:
if an user executes ,
mkdircd test then a directory called test should be created and it should be cd to test.
How i can create the command mkdircd with below action:
mkdir $1 && cd $1.
Please help me in achieving this (7 Replies)
Discussion started by: pandeesh
7 Replies
10. UNIX for Beginners Questions & Answers
My requirement is to call function ("fun1") from awk, and print its returned value along with $0.
fun1()
{
t=$1
printf "%02d\n", $t % 60;
}
echo "Hi There 23" | awk '{print $0; system(fun1 $3)}'
Any suggestions what to be modified in above code to achieve requirement.. (5 Replies)
Discussion started by: JSKOBS
5 Replies
LEARN ABOUT CENTOS
convertquota
CONVERTQUOTA(8) System Manager's Manual CONVERTQUOTA(8)
NAME
convertquota - convert quota from old file format to new one
SYNOPSIS
convertquota [ -ug ] -e filesystem
convertquota [ -ug ] -f oldformat,newformat filesystem
DESCRIPTION
convertquota converts old quota files quota.user and quota.group to files aquota.user and aquota.group in new format currently used by
2.4.0-ac? and newer or by SuSE or Red Hat Linux 2.4 kernels on filesystem.
New file format allows using quotas for 32-bit uids / gids, setting quotas for root, accounting used space in bytes (and so allowing use of
quotas in ReiserFS) and it is also architecture independent. This format introduces Radix Tree (a simple form of tree structure) to quota
file.
OPTIONS
-u, --user
convert user quota file. This is the default.
-g, --group
convert group quota file.
-f, --convert-format oldformat,newformat
convert quota file from oldformat to newformat.
-e, --convert-endian
convert vfsv0 file format from big endian to little endian (old kernels had a bug and did not store quota files in little endian
format).
-V, --version
print version information.
FILES
aquota.user new user quota file
aquota.group new group quota file
SEE ALSO
quota(1), setquota(8), edquota(8), quotacheck(8), quotaon(8), repquota(8)
AUTHOR
Jan Kara <jack@suse.cz>
4th Berkeley Distribution Fri Aug 20 1999 CONVERTQUOTA(8)