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

JBeg picture JBeg · Sep 25, 2010 · Viewed 121.6k times · Source

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?

Answer

Greg Hewgill picture Greg Hewgill · Sep 25, 2010

Use cut:

cut -c6-

This prints each line of the input starting at column 6 (the first column is 1).