This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Better handling of arguments/literals from the command-line?
Theodore Tso <tytso@mit.edu> writes:
> Another random thought; as people start creating more complicated (and
> hopefully more useful) turn-key stap scripts, it would be nice to be
> able to write scripts that have as their first line "#!/bin/stap"
That has been working fine.
> and then let the user pass command-line options to the systemtap
> script which can be parsed out by a simple in-module getopt
> function.
While we don't have getopt per se yet, a script-side accessible
argv[]/argc value pair is available. See the "argv" tapset.
- FChE