我有一个包含设定顺序的行的文本文件。我需要忽略前7行并抓住剩下的东西(如果有的话),例如:
Tuesday 22 July 10:50:29 EST 2014
Tuesday 22 July 10:50:32 EST 2014
Tuesday 22 July 10:50:32 EST 2014
Tuesday 22 July 10:50:33 EST 2014
Tuesday 22 July 10:50:38 EST 2014
Tuesday 22 July 10:50:40 EST 2014
Tuesday 22 July 10:50:45 EST 2014
Tuesday 22 July 10:50:47 EST 2014 <- I want this line and beyond
Tuesday 22 July 10:50:52 EST 2014
但如果有7行或更少,我不想接收任何行。
我一直在玩head
和tail
的各种组合,但我无法理解......
答案 0 :(得分:4)
sed 1,7d input-file
....................
答案 1 :(得分:3)
$ tail -n +3 <<< $'1\n2\n3\n4\n5'
3
4
5
所以:
tail -n +8