in reply to Re: Copy terminal lines-unix
in thread Copy terminal lines-unix
in such situations I am not free to use $_ variable. any way to bypass this??./SaveCMD "ls | perl -lne 'print $_ if /-/'" --SaveCMD-- #!/usr/bin/perl use strict; open(OUT, ">>", "cmd-out") || die "$!"; print OUT "cmd: $ARGV[0] \n"; my $cmd = $ARGV[0]; print STDERR $cmd; my $out = qx($cmd); print OUT $out; close OUT;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Copy terminal lines-unix
by Corion (Patriarch) on Oct 06, 2015 at 09:45 UTC | |
|
Re^3: Copy terminal lines-unix
by choroba (Cardinal) on Oct 06, 2015 at 12:13 UTC |