#!/bin/bash df -h | column | tail -n +2 | sed 's/%//' | sed 's/ +/ /' | sed 's/ +/ /' | sed 's/ +/ /' | sed 's/ +/ /' | sed 's/ +/ /' > /tmp/$$.txt while [ -s /tmp/$$.txt ] do mountpoint="$( head -n 1 /tmp/$$.txt)" tail -n +2 /tmp/$$.txt > /tmp/$$.txt- mv /tmp/$$.txt- /tmp/$$.txt echo "$mountpoint" done exit