29 Sep
2003
29 Sep
'03
18:53
Am Montag, 29. September 2003 20:13 schrieb Andreas Winkelmann:
Al Bogner wrote:
i=2 PARTITION=`/bin/df -P|/usr/bin/gawk '{if (NR==$i) print $1}'` echo $PARTITION # Partition wurde nicht angezeigt
Hmm, weiss jetzt nicht ob es der Königsweg ist, aber müsste klappen:
/bin/df -P|/usr/bin/gawk '{if (NR==LINE) print $1}' LINE=$i
Das klappt leider nicht: #!/bin/bash i=2 while [ $i -le 4 ] do echo $i PARTiTION=`/bin/df -P|/usr/bin/gawk '{if (NR==LINE) print $1}' \ LINE=$i` echo $PARTITION let i=$i+1 done Al