10 More Discussions You Might Find Interesting
1. 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
2. UNIX for Dummies Questions & Answers
i wish to clear memory cache on a production box and i was wondering what is the worst that can happen if i do?
i already tested this on a backup server and everything seemed fine.
but i need to know from you experts what are the worst things that can happen when i run it on a real server:
... (5 Replies)
Discussion started by: SkySmart
5 Replies
3. UNIX for Dummies Questions & Answers
Hi !
I got a script from Arabic to Roman numeral conversion - .comp.lang.awk, that I would like to modify to apply it on my input file.
input ("|"-delimited fields):
AAAAAA|1, 10, 13, 14, 25, 60
wanted output:
AAAAAA|I, X, XIII, XIV, XXV, LX
script.awk:
#!/usr/bin/gawk -f
... (11 Replies)
Discussion started by: lucasvs
11 Replies
4. 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
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
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
7. 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
8. UNIX for Advanced & Expert Users
Hi, I have various applications on my unix server and one of them relies on a process that needs to start in order to print however the process is not starting at all. I think the problem lies in the shared memory. Does anyone have the commands to flush the shared memory and can anyone tell me if... (2 Replies)
Discussion started by: cipfaadmin
2 Replies
9. 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
10. Windows & DOS: Issues & Discussions
Pls! will someone help me on how to clear my cache memory of my Internet browser
Thanks
Kayode (3 Replies)
Discussion started by: kayode
3 Replies