I was hoping to use it to maybe have a more sane interface to some
system information. For example, I would like to know how many block
are being used on an ext3 filesystem. Does rush have a better
solution than this?
$ sudo tune2fs -l /dev/sda5 |
ruby -lane '
bc=$_.match(/(\d+)$/)[0].to_i if /^Block count:/ ;
fb=$_.match(/(\d+)$/)[0].to_i if /^Free blocks:/ ;
END {puts bc-fb}
'
maybe as an attribute of a filesystem object?
Regards,
- Robert