This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Processing argv
- From: "Buddy Lumpkin" <buddy dot lumpkin at gmail dot com>
- To: systemtap at sources dot redhat dot com
- Date: Thu, 8 Jan 2009 14:06:05 -0800
- Subject: Processing argv
Ok so the announcement for release 0.7 says the following:
- The vector of script command line arguments is available in a
tapset-provided global array argv[]. It is indexed 1 ... argc,
another global. This can substitute for of preprocessor
directives @NNN that fail at parse time if there are not
enough arguments.
printf("argv: %s %s %s", argv[1], argv[2], argv[3])
For a full overview see the SystemTap Language Reference manual.
I cannot find an updated reference manual that gives a full overview.
This manual does not seem to cover it:
http://sourceware.org/systemtap/langref/
There doesn't seem to be a built in atoi. Is there an sscanf or an
intended method for converting strings to ints or do I need to roll my
own?
--Buddy