The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 10-09-2008
otheus's Avatar
otheus otheus is offline Forum Staff  
Moderator ala Mode
  
 

Join Date: Feb 2007
Location: Innsbruck, Austria
Posts: 1,886
He's processing a file stored in $_. For that, the awk one-liner looks nicer. But it would normally be replaced with:

Code:
my @test;
if (open(FOO,$_)) { 
 while ($_=<FOO>) { 
   push @test,(split)[4];
 }
}
$test=join(" ",@test);