shell 读取第一行和最后一行

2021-12-10  本文已影响0人  老陕西

取第一行:

cat hello.txt | head -n 1

取最后一行:

cat hello.txt | awk 'END {print}'
上一篇 下一篇

猜你喜欢

热点阅读