79573056

Date: 2025-04-14 11:42:02
Score: 2
Natty:
Report link

Answer proposed by @Shawn works - the trick is to use [read stdin] and not [gets stdin]

Correct answer for lint.tcl content :

#! /usr/bin/tclsh
set a [split [read stdin] \n]
puts [llength $a]

pipe command remains same:

grep -ri --color -n WRN warnings.log | lint.tcl
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • User mentioned (1): @Shawn
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: kil47