/proc/${PID}/cmdline parsing

Mihamina Rakotomandimby <[email protected]>
Newsgroups gmane.linux.newbie
Organization Gulfsat
Message-ID <[email protected]>
Manao ahoana, Hello, Bonjour,

If I launch a 
 $ watch find / -type f -name 'toto'
(it's a useless command just for the example)
and then I get the PID of this.

When I 
 $ cat /proc/${PID}/cmdline
 watchfind/-typef-nametoto

Yes, it's the command line, but I would like to parse it, in order to
display the launched executable + its arguments.

How to parse it?

Misaotra, Thanks, Merci.

-- 
       Architecte Informatique chez Blueline/Gulfsat:
    Administration Systeme, Recherche & Developpement
                                     +261 3456 000 19
--
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.