Think it easy stupidOriginariamente inviato da artorius
scusa whisher, ma perché uno dovrebbe complicarsi la vita?
Codice PHP:
$str= "Mon Oct 6 13:41:45 CEST 2008: vl-commcli(2716): executing command \"vmstat | tail -1 | head -1 | awk '{ print $13 \" \" $14 \" \" $15 }'";
$exploded = explode(": ", $str);
$data = $exploded[0];
$arr = array();
for($i = 1; $i < count($exploded); $i++)
{
$arr[] = $exploded[$i];
}
$other = implode(": ", $arr);
![]()