instead of /sbin/busybox ash
you shoudl be able to just use SU (i believe zef said he made su as a shortcut to ash)
I wanted to invoke it in the same manner as the shebang line of the script though, just to be sure that wasn't adding an additional variable to the test.
The result is the same using su for me.
Lol was more of a FYI thing
try it in a script coz it didnt work in a script it would say not a command or something
Did you dos2unix it? That's a pretty common error in linux when it's trying to interpret the ctrl-M that windows puts on new lines as part of the shebang.
Scratch that, I'm making this way more involved than it should be. Here's the unix formatted version, ignore the one from my previous posting.
# datatool backup
ash: 7739344: unknown operand
I found the problem, we can't accurately use your method. The df output is not tab delimited, it uses spaces. we can hard code the spaces but if the memory card is smaller or bigger it will screw up. aka what works on my 8gb wont work on a 512m or a 16gb, ect.
We need to strip the excess spaces:
data usage: $(df /data | cut -d K -f 3 | sed -e "s/[ ]*/\:/g" | cut -d ":" -f 4 | tail -n 1)
sdcard available: $(df /sdcard | cut -d K -f 3 | sed -e "s/[ ]*/\:/g" | cut -d ":" -f 5 | tail -n 1)
this turns it all into one :
so its like:
final datatool attached and will be in ze09.