baxy77bax has asked for the wisdom of the Perl Monks concerning the following question:
My question is : What would be the simplest way to apply this one-liner to each file in my directory: ls dir | for each file execute: perl -lne '/^([^\t]*)\t/; $hash{$1}++}{print $_ foreach(keys %hash)' thnxperl -lne '/^([^\t]*)\t/; $hash{$1}++}{print $_ foreach(keys %hash)' i +nfile.txt
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Enclosing one-liner in a bigger loop - unix
by hippo (Archbishop) on Apr 24, 2015 at 08:56 UTC | |
by baxy77bax (Deacon) on Apr 24, 2015 at 08:59 UTC | |
by Eily (Monsignor) on Apr 24, 2015 at 09:13 UTC |