What is a unix command for deleting the first N characters of a line?

前端 未结 6 1406
悲&欢浪女
悲&欢浪女 2020-11-30 17:27

For example, I might want to:

tail -f logfile | grep org.springframework | 

I was thinking that

6条回答
  •  醉梦人生
    2020-11-30 17:41

    sed 's/^.\{5\}//' logfile 
    

    and you replace 5 by the number you want...it should do the trick...

    EDIT if for each line sed 's/^.\{5\}//g' logfile

提交回复
热议问题