我有一个名为 test
的文本文件,它的内容如下:
Pigeon is the world's oldest domesticated bird.
Research suggests that domestication of pigeons was as early as ten thousand years ago.
People who keep domestic pigeons are generally called pigeon fanciers.
现在我想要这样的结果,句子顺序相反:
People who keep domestic pigeons are generally called pigeon fanciers.
Research suggests that domestication of pigeons was as early as ten thousand years ago.
Pigeon is the world's oldest domesticated bird.
我该怎么做?
最佳答案
你可以使用tac
命令:
$ tac file
关于linux - 在 UNIX 中以相反的顺序获取句子,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18814749/