#!/usr/bin/perl -w use strict; die "usage: $0 command args...\n" if not @ARGV; my @cmd; push @cmd, shift @ARGV; # program name while (@ARGV and $ARGV[0] =~ /^-/) { push @cmd, shift @ARGV; # flag } die "no filenames\n" if not @ARGV; my $first = shift @ARGV; my $run = "cat $first"; foreach (@ARGV) { $run .= " | pip -i @cmd - $_"; } print STDERR "$run\n"; exit(system($run));