mirror of
https://github.com/DrHo1y/orangepi-build.git
synced 2026-03-25 01:56:43 +07:00
12 lines
284 B
Sed
12 lines
284 B
Sed
# Deletes comments and collapses whitespace in ##-packages files
|
|
|
|
# Append (N)ext line to buffer
|
|
# if (!)not ($)buffer is EOF, (b)ranch to (:)label loop
|
|
:loop
|
|
N
|
|
$ !b loop
|
|
|
|
# Buffer is "line1\nline2\n...lineN", del comments and collapse whitespace
|
|
s/#[^\n]*//g
|
|
s/[[:space:]]\{1,\}/ /g
|