例如,我可能想:
tail -f logfile | grep org.springframework | <command to remove first N characters>
我在想 tr
可能有能力做到这一点,但我不确定。
最佳答案
使用剪切
。例如。去除每行的前 4 个字符(即从第 5 个字符开始):
tail -f logfile | grep org.springframework | cut -c 5-
关于bash - 什么是删除一行的前 N 个字符的 unix 命令?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/971879/