bash - What does the `l` option mean in GNU sed? -
i have read sed manual -l command. there says:
-l --line-length=nspecify default line-wrap length
lcommand. length of 0 (zero) means never wrap long lines. if not specified, taken 70.
i don't know how useful. can give me example?
i think this,but result:
[root@kvm ~]# echo 'abcdefg' | sed -l 3 -n '/a/p' abcdefg
from sed manual:
commands accept address ranges
...
llist out current line in ``visually unambiguous'' form.
lwidthlist out current line in ``visually unambiguous'' form, breaking @ width characters. gnu extension.
the -l n, --line-length=n option allows specify desired line-wrap length 'l' command (when wrap-width argument not explicitly provided in sed script).
$ echo abcdefgh | sed -n 'l 5' abcd\ efgh$ $ echo abcdefgh | sed -n -l 5 'l' abcd\ efgh$ $ echo abcdefgh | sed -n -l 5 'l 3' ab\ cd\ ef\ gh$
Comments
Post a Comment