Hacker News new | ask | show | jobs
by upon_drumhead 734 days ago
FWIW, on ubuntu 22.04, your "Efficient" doesn't work

    # df -h | grep "$partition" | awk '{print $5}' | sed 's/%//'
    24
    # df -h | grep -Po "\d+(?=%\s+$partition)"
    #