the only thing I don't understand is '/ Links: '
Suas linhas sed
filtros combinam com o padrão Links:
(com espaço à esquerda e à direita) e executam a substituição
s/.*Links: *//
Além disso, usar -n
suprime a impressão automática de espaço de padrão e p
imprime o espaço de padrão atual.
Para resumir, o sed
pipeline deve imprimir apenas as linhas correspondentes a Links:
na entrada depois de executar a substituição s/.*Links: *//
.
Citações de man sed
:
-n, --quiet, --silent
suppress automatic printing of pattern space
p Print the current pattern space.
/regexp/
Match lines matching the regular expression regexp.
s/regexp/replacement/
Attempt to match regexp against the pattern space. If
successful, replace that portion matched with replacement. The
replacement may contain the special character & to refer to that
portion of the pattern space which matched, and the special
escapes through to refer to the corresponding matching
sub-expressions in the regexp.