1. Get last column
# df -h | awk '{print $NF}'


2. Get last two column
# df -h | awk '{print $(NF-1)}'


Reference: http://stackoverflow.com/questions/4304917/how-to-print-last-two-columns-using-awk

arrow
arrow
    全站熱搜

    dreamtails 發表在 痞客邦 留言(0) 人氣()