Friday, September 1, 2017

reading 3 lines in one time in oneliner perl

  cat PDDV_hosts.txt | perl -e 'while (my $frs=<>) { chomp $frs; $sec=<>; chomp $sec; $th=<> ;printf "%s,%s,%s", $frs, $sec, $th; }'

No comments:

Post a Comment