Longest common prefix: Difference between revisions
m
sed: simplify for improved compatibility
(add sed) |
m (sed: simplify for improved compatibility) |
||
Line 3,374:
=={{header|sed}}==
<syntaxhighlight lang="sed">
N
s/^\(
▲$!d</syntaxhighlight>
{{out}}
<pre>
Line 3,390 ⟶ 3,388:
$ printf '%s\n' throne '' throne | sed -f lcp.sed
$ printf '%s\n' cheese | sed -f lcp.sed
cheese
$ printf '%s\n' '' | sed -f lcp.sed
|