01-10-2014
Quote:
Originally Posted by
bartus11
Try using "gawk".
That is a solution, of course, but I'm using mawk because of the size of the datasets we're working with. Depending on the task, we have anywhere from 3 to 7 times better performance. So, it's been an ongoing project to convert those tasks that we can to mawk. I'd like to do so for this one as well, as it is a very time-consuming job.
10 More Discussions You Might Find Interesting
1. Programming
What is the output of the following program considering an x86 based parameter passing sequence where stack grows towards lower memory addresses and that arguments are evaluated from right to left:
int i=10;
int f1()
{
static int i = 15;
printf("f1:%d ", i);
return i--;
}
main()
{... (2 Replies)
Discussion started by: arunviswanath
2 Replies
2. Shell Programming and Scripting
How to print output in following format?
A..................ok
AA................ok
AAA..............ok
AAAAAA........ok
"ok" one under one (4 Replies)
Discussion started by: mirusnet
4 Replies
3. Shell Programming and Scripting
Hi friends..
I am confused about awk printf option..
I have a comma separated file
88562848,21-JAN-08,2741079, -1188,-7433,TESTING
88558314,21-JAN-08,2741189, -1273,-7976,TESTING
and there is a line in my script ( written by someone else)
What is the use of command?
I guess... (10 Replies)
Discussion started by: clx
10 Replies
4. Shell Programming and Scripting
echo $bbsize
1.5
echo $fillpercent
.95
echo $bbsize | awk '{printf "%.2f\n",$0*$fillpercent}'
2.25
echo $bbsize | awk '{printf "%.2f\n",$0*.95}'
1.42
1.42 is what I'm expecting...
echo $blocksize
4096
echo $bbsize | awk '{printf "%.2f\n",$0*$blocksize}'
2.25
echo $bbsize |... (3 Replies)
Discussion started by: xgringo
3 Replies
5. Shell Programming and Scripting
Hi Friends,
Scripting newb here. So I'm trying to create a geektool script that uses awk and printf to output certain fields from top (namely command, cpu%, rsize, pid and time, in that order). After much trial and error, I've pretty much succeeded, with one exception. Any process whose name... (3 Replies)
Discussion started by: thom.mattson
3 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I have just completed my first script (:D) and now i just need to format it with printf.
This is what I have:
#!/bin/ksh
TOTB=0
TOTF=0
TOTI=0
HOST=`hostname`
echo " FSYSTEM BLKS FREE INUSE MOUNTEDON"
df -m | grep -v ":"|grep -v Free|grep -v "/proc"| while read FSYSTEM... (2 Replies)
Discussion started by: compan023
2 Replies
7. UNIX for Dummies Questions & Answers
I have two files and would like a report of where they match.
Example of file1:
1 1 1
2 2 2
13 14 15
4 4 4
15 16 17
100 102 1004
56 57 890
Example of file2:
2 2 2
16 10 11
45 22 35
13 14 15
1001 1002 3456
100 102 1004 (1 Reply)
Discussion started by: kenneth.mcbride
1 Replies
8. UNIX for Dummies Questions & Answers
I have this command like that has %s in it, I know %s calls a column, but I am not sure I understand which column (I mean for my case I can check the input file, but I want to know how is this %s used, how comes tha same symbo; gives different columns in one command line:
{printf "grep %s... (22 Replies)
Discussion started by: cosmologist
22 Replies
9. Shell Programming and Scripting
As Brendan O'Conner writes in this blog, mawk is near 8 times faster than gawk, so I am going to give mawk a go, but I got errors when trying to print the length of an array in mawk using length() function, is it not supported in mawk? or there's another way to get the length of an array in mawk?
... (3 Replies)
Discussion started by: kevintse
3 Replies
10. UNIX for Advanced & Expert Users
I frequently use awk time functions and am switching some scripts over to mawk. I don't have the mktime or strftime functions in mawk, but it appears that there is a way, as explained here in "Time functions":
Please only cut-and-past links to man pages from our man pages.
So, simple... (10 Replies)
Discussion started by: treesloth
10 Replies
LEARN ABOUT DEBIAN
pvmfadvise
ADVISE(3PVM) PVM Version 3.4 ADVISE(3PVM)
NAME
pvm_advise() - Controls use of direct task-to-task routing.
[In Version 3.2: Replaced by pvm_setopt]
SYNOPSIS
C int info = pvm_advise( int route )
Fortran call pvmfadvise( route, info )
PARAMETERS
route Integer advising PVM to set up direct task-to-task links.
route options
PvmDontRoute 1 Don't allow direct links to this task
PvmAllowDirect 2 Allow but don't request direct links
PvmRouteDirect 3 Request direct links
info Integer returning error status.
DESCRIPTION
The routine pvm_advise advises PVM on whether or not to set up direct task-to-task links (using TCP) for all subsequent communication. Once
a link is established it remains until the application finishes. If a direct link can not be established because one of the two tasks has
requested PvmDontRoute or because no resources are available, then the default route through the PVM daemons is used. pvm_advise can be
called multiple times to selectively establish direct links, but is typically set only once near the beginning of each task. PvmAllowDi-
rect is the default advise setting. This setting on task A allows other tasks to set up direct links to A. Once a direct link is estab-
lished between tasks both tasks will use it for sending messages. pvm_advise returns the error status in info. The performance of direct
task-to-task links can be up to a factor of two better than the default route. The draw back is a lack of scalability of the direct links.
Some versions of UNIX limit the number of links to no more than 30.
EXAMPLES
C:
info = pvm_advise( PvmRouteDirect );
Fortran:
CALL PVMFADVISE( PVMROUTEDIRECT, INFO )
ERRORS
This error condition can be returned by pvm_advise
PvmBadParam
giving an invalid route value.
SEE ALSO
pvm_setopt(3PVM)
30 August, 1993 ADVISE(3PVM)