Skip to content

Instantly share code, notes, and snippets.

@talentwill
Last active August 15, 2016 10:20
Show Gist options
  • Select an option

  • Save talentwill/736e902d2e86e8546a833f15ef4badd4 to your computer and use it in GitHub Desktop.

Select an option

Save talentwill/736e902d2e86e8546a833f15ef4badd4 to your computer and use it in GitHub Desktop.
删除每行前几个字符
# 从第10行开始,到最后,删除每行前25个任意字符
sed -i '10,$s/^.\{25\}//' test.txt
# 替换包含BTS字段的行为-
sed -i '/.*BTS.*/s/.*/-/g' syslog_Enb_syslog_1.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment