23. Bash Shell - 文本处理:cat、tac、nl、head、tail
开篇词 结合词处理命令,我们可以简便地从文本输出或文本文档中获取我们想要的文本。 准备 我们可以借助 echo 命令来将文本输出至一个文件。 准备内容: echo "First line" >> file.txt echo "Second line" >> file.txt echo "Third line" >> file.txt echo "Fourth line" >> file.txt echo "Fifth line" >> file.txt echo "Sixth line" >> file.txt echo "Seventh line" >> file.txt echo "Eighth line" >> file.txt echo "Ninth line" >> file.txt echo "Tenth line" >> file.txt echo "Eleventh line" >> file.txt echo "Twelfth line" >> file.txt echo "Thirteenth line" >> file.txt echo "Fourteenth line" >> file.txt echo "Fifteenth line" >> file.txt echo "Sixteenth line" >> file.txt echo