I have created a little script that creates a "visual" overview of df -k in a webbrowser.

To get the "visual" aspect I print an # for every 10% disk usage. Now comes my problem.

What i do atm is:

echo "##########" > tmp/tmpfile.$$
ZUSAGE=`cat tmp/tmpfile.$$ | cut -c1-$AUSAGE`
Now i want to make the website nicer by using a graphic and printing that X times.... However I had issues with al lthe types of fro and while loops I tried. I'm not sure what i was doing wrong but could someone give me a clue how it would work?

I tried things along the lines of (could be typos/syntax errors below as it I did this a while ago)

while (x=0;x<$AUSAGE;x++)
   print "#"
any ideas how it should be done?