1
Software / How To Find Memory Occupied By Installed *.ipk
« on: June 16, 2005, 07:22:19 am »Quote
Shouldn't be a problem. Like I said before, directories & links on a unix filesystem are still just special files that take up space, albeit a small amount compared to other 'regular' files.
Yes I agree with you. I just thought this could be the cause of error.
Quote
The syntax is correct for all modern bourne- & korn-based shells I'm aware of, which includes the version of sh provided by busybox, but let's see. What's the exact output of these commands on your Z?Code: [Select]root@grond[~]# N=4
root@grond[~]# T=$((T+N))
root@grond[~]# echo $N $T
4 4
root@grond[~]# T=$((T+N))
root@grond[~]# echo $N $T
4 8
root@grond[~]# T=$((T+N))
root@grond[~]# echo $N $T
4 12
Here is the error!!!
If I typed this in my default shell (/bin/bash) I got the same output as you.
But if I first typed:
/usr/bin/env sh
and after switched to the shell environment typed:
$ N=4
$ T=$((T+N))
the error returned:
arith: syntax error: "T+N"
I dodn't know in which shell I went after "/usr/bin/env sh" but after I have changed in your script the first line to the "/bin/bash" everything start to work and I found that my file.ipkg has installed size 966kb
Thank you grog for your time and the nice script
suruaZ