Blame view

tools/scripts/NbMaxWordsFilter.pl 175 Bytes
e6be5137b   Jean-François Rey   reinitialized pro...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
  #!/usr/bin/perl
  
  my $nbMax = 50;
  
  if(@ARGV == 1){
  	$nbMax = $ARGV[0];
  }
  
  while(<STDIN>){
  	my @splittedLine = split(/ /, $_);
  	if(@splittedLine < $nbMax + 3){
  		print $_;
  	}
  }