Hallo!
Ich lasse mit eine Logdatei mit cat und awk so filtern, dass ich nur die Datum Strings der Dateie habe
ergibt
Nun möchte ich gern, dass ich diese Ausgabe in ein Array packe in der Form
Mein Versuch mit
ergibt aber ein Array
wie mappe ich die Zeilen in ein Array?
VG niesel
Ich lasse mit eine Logdatei mit cat und awk so filtern, dass ich nur die Datum Strings der Dateie habe
Code:
cat tmp.log | awk -v count=$COUNT 'NR>=4 && NR<count'| awk '{print $6" "$7" "$8}'
Code:
Oct 26 10:40
Oct 26 10:41
Oct 26 10:42
Code:
$array={"Oct 26 10:40","Oct 26 10:41","Oct 26 10:42"}
Code:
$array=($(cat tmp.log | awk -v count=$COUNT 'NR>=4 && NR<count'| awk '{print $6" "$7" "$8}'))
Code:
$array={"Oct","26", "10:40","Oct"..}
VG niesel
0 commentaires:
Enregistrer un commentaire