您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

remove-comments.sed 284 B

1234567891011
  1. # Deletes comments and collapses whitespace in ##-packages files
  2. # Append (N)ext line to buffer
  3. # if (!)not ($)buffer is EOF, (b)ranch to (:)label loop
  4. :loop
  5. N
  6. $ !b loop
  7. # Buffer is "line1\nline2\n...lineN", del comments and collapse whitespace
  8. s/#[^\n]*//g
  9. s/[[:space:]]\{1,\}/ /g