Skip to content

Instantly share code, notes, and snippets.

@bromne
Last active June 16, 2025 12:35
Show Gist options
  • Select an option

  • Save bromne/6fe32c2488274d4cc8f6484ff16ef20b to your computer and use it in GitHub Desktop.

Select an option

Save bromne/6fe32c2488274d4cc8f6484ff16ef20b to your computer and use it in GitHub Desktop.
perl -e 'for my $file (@ARGV) { next unless -f $file; my $max = 0; open my $fh, "<", $file or next; while (<$fh>) { chomp; $max = length if length > $max } close $fh;  print "$file $max\n" }'

Usage

... src/components/*.ts | sort -k 2 -n
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment