Voivi un shell qui affiche la ligne de commande
d'un process en cours (le process X, lanc� avec plein
de param�tres,avec xdm), mais qui ne marche pas:

#!/bin/ash
#
for i in `ls /proc/*/status` ; do
 mg=`sed -n "/Name:.*X/p" $i`
 if test -n "$mg" ; then
  pid=`echo $i | sed 's+/proc/\(.*\)/.*+\1+'`
  ps $pid
   sed 's/$/ !\n/
    s/[\00]/ /g
    s/$/\n/'  /proc/$pid/cmdline
#   sed b /proc/$pid/status
  echo ""
 fi
done

Le probl�me est:
1) /proc/$pid/cmdline contient des null (\000)
qu'il faudrait convertir en espaces
2) il serait plus �l�gant d'ajouter un "\n" en fin de ligne

begin:vcard 
n:Gennerat;Christian 
x-mozilla-html:FALSE
url:http://libxg.free.fr/181808.gif
adr:;;;;;;
version:2.1
email;internet:[EMAIL PROTECTED]
x-mozilla-cpt:;1280
end:vcard

Répondre à