T
Traxmaxx
Grünschnabel
Morgen!
Ich hab folgendes Problem:
Ich will aus einer Textdatei bestimmte Stellen rausholen, was mit
soweit auch super funktioniert.
Nun möchte ich aber
in eine variable packen. Ich hab alles durchprobiert. Jedoch geht es weder mit
noch mit sonstigen anderen möglichkeiten die ich versucht habe. Hat einer ne Idee wie ich das hinbekomme?
Danke euch schonmal
Tschö mit ö Traxmaxx
Ich hab folgendes Problem:
Ich will aus einer Textdatei bestimmte Stellen rausholen, was mit
Code:
#!/bin/bash
PATH=/usr/local/bin:/usr/bin:/bin
YEAR=`date +%y`
vnstat -d | cat | while read line
do
if [ "$VAR" = 5 ]
then
if [ "$line" = "------------------------+-------------+--------------" ]
then
exit 0
else
echo $line | awk '{ print $1 }'
fi
else VAR=$[VAR + 1 ]
fi
done
Nun möchte ich aber
Code:
$line | awk '{ print $1 }'
Code:
$variable = $line | awk '{ print $1 }'
Danke euch schonmal
Tschö mit ö Traxmaxx