Using Raku (formerly known as Perl_6)
~$ raku -ne 'if .chars > 78 {put $_ ~ ($_ with get) } else { put $_ };' file
We can recreate this problem for any such file, not just slapcat output. Below we generate an alphabetic "truncated triangle" file, tri_N-to-Z.txt :
~$ raku -e 'for (0..12) -> $i { $_.[0..(25-$i)].join.put given "\x0061".."\x07A"};' > tri_N-to-Z.txt
Here we break lines at 20 characters (wraps 7 lines)...
Sample Input:
~$ cat tri_N-to-Z.txt | raku -pe 's/^ (.**20) /{"$0\n"}/;' > tri_N-to-Z_wrapped.txt
~$ cat tri_N-to-Z_wrapped.txt
abcdefghijklmnopqrst
uvwxyz
abcdefghijklmnopqrst
uvwxy
abcdefghijklmnopqrst
uvwx
abcdefghijklmnopqrst
uvw
abcdefghijklmnopqrst
uv
abcdefghijklmnopqrst
u
abcdefghijklmnopqrst
abcdefghijklmnopqrs
abcdefghijklmnopqr
abcdefghijklmnopq
abcdefghijklmnop
abcdefghijklmno
abcdefghijklmn
Sample Output (recreates the original truncated triangle):
~$ raku -ne 'if .chars > 19 {put $_ ~ ($_ with get) } else { put $_ };' tri_N-to-Z_wrapped.txt
abcdefghijklmnopqrstuvwxyz
abcdefghijklmnopqrstuvwxy
abcdefghijklmnopqrstuvwx
abcdefghijklmnopqrstuvw
abcdefghijklmnopqrstuv
abcdefghijklmnopqrstu
abcdefghijklmnopqrst
abcdefghijklmnopqrs
abcdefghijklmnopqr
abcdefghijklmnopq
abcdefghijklmnop
abcdefghijklmno
abcdefghijklmn
Note: the code ($_ with get) is simply to make sure that get is called on an existent line, e.g. at the very end of the file (with checks for definedness).
https://raku.org