This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

String parsing in stap script


I'm trying to figure out how to parse a string in a stap script. Ideally, I'd like a function like strsep() where I pass in a string and delimiter and get back a token and a pointer to the string past the token. Given that a stap function can only pass back one value, I don't see how to accomplish this. Any suggestions or is this just not possible?

BTW, my initial reason for wanting this is to pass an array from a shell script to a stap script. I figure I can just pass it as one long delimited string, then parse it on the stap side to get it back in array form.

- Mike


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]