79399358

Date: 2025-01-30 09:27:51
Score: 0.5
Natty:
Report link

To append ellipsis to long lines with awk one can

echo 'blablabla' | \
  awk '{if (length($0) <= 100) print $0; else print substr($0, 1, 100) " ..."}'

.. or even

echo 'blablabla' | \
  awk '{if (length($0) <= 100) print $0; else print substr($0, 1, 100) " \033[90m...\033[0m"}'
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: arcadius