美文网首页Linux
Truncate file by lines

Truncate file by lines

作者: JaedenKil | 来源:发表于2019-02-18 17:21 被阅读0次
awk 'FNR>=start && FNR<=end' sourceFile > targetFile

For instance

awk 'FNR>=100 && FNR<=200' logcat.log > error.log
// From file `logcat.log` Save line 100 to line 200 to file `error.log`

相关文章

网友评论

    本文标题:Truncate file by lines

    本文链接:https://www.haomeiwen.com/subject/sfhzeqtx.html