OR maybe you have other plans for the text...#!/usr/bin/perl -n print if (/NAME/../SYNOPSIS/); # then: man ls | this_script.pl
#!/usr/bin/perl $cmd = shift; open MAN, "man - $cmd |"; while (<MAN>) { $section = $_ if /^[ A-Z]+$/; push @lines, $_ if $section =~ /NAME|DESCRIPTION/; } do_something_else_with(@lines); # perhaps get rid of the page headers/footers
In reply to Re: Re: script debug
by faure
in thread script debug
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |