foexle
Kaiser
Sers Leute ich mal wieder :>
ich hab ein kleines Prob mit meiner shellsyntax
hier sagt er mir bei ${cpu[14]}
Syntax error: Bad substitution
was mache ich falsch ?
lg
edit:
ich glaub das liegt daran das CPU nicht gefüllt wird ! ....
denn normal kommt da set -A hin um ein array zu erzeugen ... aber -A gibts nicht mehr ... hat da wer eine andere idee ?
ich hab ein kleines Prob mit meiner shellsyntax
Code:
#!bin/ksh
set cpu `vmstat 2 2 | tail -1`
cpu_all=${cpu[14]}
echo $cpu_all
hier sagt er mir bei ${cpu[14]}
Syntax error: Bad substitution
was mache ich falsch ?
lg
edit:
ich glaub das liegt daran das CPU nicht gefüllt wird ! ....
denn normal kommt da set -A hin um ein array zu erzeugen ... aber -A gibts nicht mehr ... hat da wer eine andere idee ?
Zuletzt bearbeitet: