取文件最后一行

sed -n '$p' file
tail -n 1 file
awk '{ t=$0 } END { print t} '
 

猜你喜欢

转载自snmp.iteye.com/blog/770564