02-16-2006
fp
actually i want to import a file pointer or file descriptor to be used in another program .
In the eg (p1.c) ,i am passing a fp through execl function to p2.c,where i am employing it to write in to a file.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
With so many diffrent flavors out there, how is a person soposed to know what to go with? I'm not asking for specific discussion here in this forum, but I would like to see various pages and articles dicsussing the pluses and minuses of various unix/linux OS's. I have been searching various... (1 Reply)
Discussion started by: MorderKartoffel
1 Replies
2. UNIX for Advanced & Expert Users
Hi guys,
We have different IP ranges in our LAN, for instance my system IP Add. is in 163.183.37.x range, in the meantime i wish to connect to our printer/plotter which is 163.183.4.x & our LAN in another location with 163.183.38.x.
What shoul i do except defining pesudo IP Add's? as a... (1 Reply)
Discussion started by: nikk
1 Replies
3. UNIX for Dummies Questions & Answers
Can sed be used to take a existing record and reverse the order of defined character placement if there is no delimeters?
existing record:
0123456789CO
expected result:
9876543210CO
if there were delimeters I could define the delimeter and each placement would have an id which I... (1 Reply)
Discussion started by: r1500
1 Replies
4. Shell Programming and Scripting
When I type a command at the command line it supplies one result and the exact same command in a script
egrep '^01|^02|^03|^04' file > fileout
count = 29353
same count in the script yields a count of 23492
is there any reason this could be happening. (1 Reply)
Discussion started by: r1500
1 Replies
5. Shell Programming and Scripting
i have serverA and serverB and i have a folder with same name an location in both servers.... Now i want to compare files in folder(serverA) with folder (serverB) if there are files missing in folderB then copy those files from folder(serverA) to folder(serverB) (1 Reply)
Discussion started by: ashahzad
1 Replies
6. Red Hat
Hi
im trying to configure samba on linux server so win client can access the shared files but my win client is on diffrent domain , we recently changed our domain name but not for certain servers...
i guess the samba linux server is still part of our sub domain which is why i still can access... (4 Replies)
Discussion started by: halacil
4 Replies
7. Solaris
Hi,
I have issue with cron.
When i run script manually output is fine but when i add it to cron output file is not as same.
both file attach some junk charecter comming in cron output.
thanx
Jignesh (5 Replies)
Discussion started by: jkmistry
5 Replies
8. Shell Programming and Scripting
I couldn't find the answer anywhere, so I hope you could help me.
I need to change something like the following:
something/bla/aaaa
anything/bbb
to:
something
--bla
----aaaa
anything
--bbb
How do I do this?
Is it possible with sed?
I tried various patterns, but don't know how to... (5 Replies)
Discussion started by: Patwan
5 Replies
9. Shell Programming and Scripting
Heyas
I'm currently attempting to apply the code of tui-select to tui-list.
That is because tui-list simply made a 1 string list, while tui-select uses dynamicly up to 3 strings per line.
Anyway, so i copy pasted the code, and just made the changes marked with red....
Know that both scripts... (2 Replies)
Discussion started by: sea
2 Replies
10. UNIX for Beginners Questions & Answers
hi,
would you help me?
i have file total.csv
"a","e23","f"
"b,"34d","g"
"c","45f","f"
"d","45s","f"
count.csv
3
i do this :
paste -d',",' total.csv count.csv
but the result like this:
"a,"e23","f" 3
"b,"34d","g" (1 Reply)
Discussion started by: kivale
1 Replies
LEARN ABOUT ULTRIX
varargs
varargs(5) File Formats Manual varargs(5)
Name
varargs - handle variable argument list
Syntax
#include <varargs.h>
va_alist
va_dcl
void va_start(pvar)
va_list pvar;
type va_arg(pvar, type)
va_list pvar;
void va_end(pvar)
va_list pvar;
Description
This set of macros allows portable procedures that accept variable argument lists to be written. Routines that have variable argument
lists, such as but that do not use are inherently nonportable, as different machines use different argument-passing conventions.
va_alist Is used as the parameter list in a function header.
va_dcl Is a declaration for va_alist. A semicolon should not follow va_dcl.
va_list Is a type defined for the variable used to traverse the list.
va_start Is called to initialize pvar to the beginning of the list.
va_arg Returns the next argument in the list pointed to by pvar. Type Is the type the argument is expected to be. Different types can
be mixed, but it is up to the routine to know what type of argument is expected. This information cannot be determined at run
time.
va_end is used to clean up.
Multiple traversals, each bracketed by va_start ... va_end, are possible.
The calling routine must specify how many arguments there are, because it is not always possible to determine this from the stack frame.
For example, is passed a zero pointer to signal the end of the list. The routine can tell how many arguments there are by the format.
It is nonportable to specify a second argument of char, short, or float to va_arg, because arguments seen by the called function are not
char, short, or float. C converts char and short arguments to int and converts float arguments to double before passing them to a func-
tion.
Examples
The following example presents an implementation of
#include <varargs.h>
#define MAXARGS 100
/* execl is called by
execl(file, arg1, arg2, ..., (char *)0);
*/
execl(va_alist)
va_dcl
{
va_list ap;
char *file;
char *args[MAXARGS];
int argno = 0;
va_start(ap);
file = va_arg(ap, char *);
while ((args[argno++] = va_arg(ap, char *)) != (char *)0)
;
va_end(ap);
return execv(file, args);
}
See Also
exec(2), printf(3s), vprintf(3s)
RISC varargs(5)