Advertisement
digimer

Untitled

Jul 10th, 2015
327
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.32 KB | None | 0 0
  1. #!/usr/bin/perl
  2. #
  3.  
  4. use strict;
  5. use warnings;
  6. use IO::Handle;
  7.  
  8. my $shell_call = "/sbin/blkid";
  9. open (my $file_handle, "-|", $shell_call) or die "Failed to call: [$shell_call], error was: $!\n";
  10. while (<$file_handle>)
  11. {
  12.     chomp;
  13.     my $line = $_;
  14.     print "Do work on: [$line]\n";
  15. }
  16. close $file_handle;
  17.  
  18. exit(0);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement