diff options
author | Karl Berry <karl@freefriends.org> | 2009-01-25 01:57:18 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2009-01-25 01:57:18 +0000 |
commit | af944c3e4ba74f59f21178c8477fdea4b682ef2b (patch) | |
tree | afa6af46a5179bdbd38a05fa7d63b2ff8ae32516 /Build/source/utils/texinfo/util/infosrch | |
parent | 0cea5be7570fb0ddc3d28e6bb8371809e04ca2ae (diff) |
remove texinfo
git-svn-id: svn://tug.org/texlive/trunk@11963 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/texinfo/util/infosrch')
-rwxr-xr-x | Build/source/utils/texinfo/util/infosrch | 104 |
1 files changed, 0 insertions, 104 deletions
diff --git a/Build/source/utils/texinfo/util/infosrch b/Build/source/utils/texinfo/util/infosrch deleted file mode 100755 index af4a9a6290d..00000000000 --- a/Build/source/utils/texinfo/util/infosrch +++ /dev/null @@ -1,104 +0,0 @@ -#!/usr/local/bin/perl -w -# $Id: infosrch,v 1.2 2004/04/11 17:56:47 karl Exp $ -# infosrch does a regex search on an info manual. -# By Harry Putnam <reader@newsguy.com>. - -($myscript = $0) =~ s:^.*/::; -$six = ''; - -if($ARGV[0] eq "help"){ - &usage; - exit; -} -if($ARGV[0] eq "-e"){ - shift; - $six = "true"; -} -if(!$ARGV[1]){ - &usage; - exit; -} - -$target = shift; -$regex = shift; - -$shell_proc = "info --output - --subnodes 2>/dev/null $target"; - -open(SHELL_PROC," $shell_proc|"); -while(<SHELL_PROC>){ - chomp; - push @lines,$_; -} -close(SHELL_PROC); -$cnt = 0; -for(@lines){ - if(/$regex/ && !$six){ - print "$target\n $lines[($cnt-1)]\n<$cnt> $lines[$cnt]\n $lines[($cnt+1)]\n"; - print "-- \n"; - }elsif(/$regex/ && $six){ - print "$target\n"; - if($lines[($cnt-6)]){ - print " $lines[($cnt-6)]\n"; - } - if($lines[($cnt-5)]){ - print " $lines[($cnt-5)]\n"; - } - if($lines[($cnt-4)]){ - print " $lines[($cnt-4)]\n"; - } - if($lines[($cnt-3)]){ - print " $lines[($cnt-3)]\n"; - } - if($lines[($cnt-2)]){ - print " $lines[($cnt-2)]\n"; - } - if($lines[($cnt-1)]){ - print " $lines[($cnt-1)]\n"; - } - if($lines[$cnt]){ - print "$cnt $lines[$cnt]\n"; - } - if($lines[($cnt+1)]){ - print " $lines[($cnt+1)]\n"; - } - if($lines[($cnt+2)]){ - print " $lines[($cnt+2)]\n"; - } - if($lines[($cnt+3)]){ - print " $lines[($cnt+3)]\n"; - } - if($lines[($cnt+4)]){ - print " $lines[($cnt+4)]\n"; - } - if($lines[($cnt+5)]){ - print " $lines[($cnt+5)]\n"; - } - if($lines[($cnt+6)]){ - print " $lines[($cnt+6)]\n"; - } - print "-- \n"; - } - $cnt++; -} - -sub usage { - print <<EOM; - -Purpose: Extract full text from info node and search it by regex -Usage: $myscript [-e] TARGET REGEX - -Where TARGET is an info node such as `emacs', `bash' etc, and -REGEX is what you want to find in it. - -The -e flag is not required but if used then 6 lines preceding and six -lines following any hits will be printed. The default (with no -e flag) -is to print one line before and after. - -The output has the line number prepended to the line containing the -actual regex. - -Info command used: - info --output - --subnodes 2>/dev/null TARGET - -EOM -} |