Assuming "df" follows the same rules as mount (last mounted is last in the list), this may be cleaner: #!/bin/bash volume=`df` volume=${volume##*%} echo $volume Luke Scott