Ciao ragazzi,
avrei bisogno di killare n processi del tipo:

...
postgres 6331 0.0 0.0 21456 2320 ? S 14:43 0:00 postgres: nomeutente nomedatabase 62.149.206.XXX idle
postgres 6331 0.0 0.0 21456 2320 ? S 14:44 0:00 postgres: nomeutente nomedatabase 62.149.206.XXX idle
postgres 6331 0.0 0.0 21456 2320 ? S 14:45 0:00 postgres: nomeutente nomedatabase 62.149.206.XXX idle
postgres 6331 0.0 0.0 21456 2320 ? S 14:46 0:00 postgres: nomeutente nomedatabase 62.149.206.XXX idle
postgres 6331 0.0 0.0 21456 2320 ? S 14:47 0:00 postgres: nomeutente nomedatabase 62.149.206.XXX idle
...

in base al più vecchio.

Le parole chiave nel processo dovrebbero essere nomeutente e postgres.

Lanciando un comando del tipo:

killa 4 nomeutente

la shell dovrebbe generare il seguente risultato ( lanciando ps aux ):

...
postgres 6331 0.0 0.0 21456 2320 ? S 14:47 0:00 postgres: nomeutente nomedatabase 62.149.206.XXX idle
...

Chi mi aiuta a realizzare la cosa?