Linux 中查看文件第n行內容的命令

方法1:spa head -m filename | tail -1                    //查看filename文件的第m行(tail -1 是數字1) awk e.g.   head -100 data.txt | tail -1          //查看data.txt文件的第100行sed 方法2:file  nl filename | sed -n 'mp'     
相關文章
相關標籤/搜索