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

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