sscanf: get first and last token in a string

Is it possible by using sscanf to get the first token then skip some tokens and then get the last one? For example, the output of /bin/ps -fu1000 cm 2249 1548 0 0:00.00 ttys001 0:00.01 man sscanf I have tried: sscanf(line, "%s %[^\n]", user, cmd); The result should be: user = "cm"; cmd = "man sscanf": But it does not work.

以上就是sscanf: get first and last token in a string的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » CSS3 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准