Truncate file by lines
2019-02-18 本文已影响0人
JaedenKil
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`