Delete the first five characters on any line of a text file in Linux with sed

前端 未结 5 663
甜味超标
甜味超标 2020-12-13 01:35

I need a one-liner to remove the first five characters on any line of a text file. How can I do that with sed?

5条回答
  •  隐瞒了意图╮
    2020-12-13 01:59

    sed 's/^.....//'
    

    means

    replace ("s", substitute) beginning-of-line then 5 characters (".") with nothing.

    There are more compact or flexible ways to write this using sed or cut.

提交回复
热议问题