I have the following perl script as a text filter. It is designed to take
the lines being acted on and run each as a unix command. The script does
run the commands, but instead of putting the output back in the original
file it opens the Unix Script Output log and puts it there. I have a number
of other perl filters and none of them do that, however they are not
running shell commands within them. Is there a way I can get this script to
do what I want?
#!/usr/bin/perl
while (<>) {
chomp($_);
if ( length($_) > 2 ) {
$command = `$_`;
print $_ . "\n" . $command . "\n";
}
}
Thanks,
-matt
--
This is the BBEdit Talk public discussion group. If you have a feature request
or need technical support, please email "[email protected]" rather than
posting here. Follow @bbedit on Twitter: <https://twitter.com/bbedit>
---
You received this message because you are subscribed to the Google Groups
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/bbedit/476ab1c8-482f-4a13-aad9-7385de3a9e07n%40googlegroups.com.