"Not long ago, I was poking around one of our production web servers and noticed the following curiosity in a shell script," writes Marshall G.

/bin/cat /var/run/netstat_r.lst | /usr/bin/wc | /usr/bin/cut -b -8 |perl -e 'my $r=<>; $r =~ s/^\s+//; print "$r"'

"Since the command only counts the number of lines in netstat_r.lst, I'm perplexed at the complexity of this approach."

"Especially since the author thought to use the wc command but not the -l option."