3 # Purpose: query a signature file for a specific keyword and display results
4 # Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>, (c) Alexander Wirt <formorer@grml.org>
5 # Bug-Reports: see http://grml.org/bugs/
6 # License: This file is licensed under the GPL v2.
7 # Latest change: Sam Mär 03 15:35:38 CET 2007 [mika]
8 ################################################################################
15 B<grml-tips> - query a signature file for a specific keyword and display results
19 B<grml-tips> [OPTION] I<keyword>
23 This manual page documents briefly the B<grml-tips> command.
31 Print this help and exit.
39 =item B<grml-tips> I<ntfs>
41 Query grml-tips file for tips / hints including keyword "ntfs".
43 =item B<grml-tips> I<.>
45 Display all available B<grml-tips> at once.
51 /usr/share/grml-tips/grml_tips
53 Signature file containing the tips.
61 grml-tips was written by Alexander Wirt <formorer@grml.org>
66 my $grml_tips = '/usr/share/grml-tips/grml_tips';
71 -message => 'No search pattern provided',
73 } elsif ($pattern eq '--help') {
79 if (! open ($fh, '<', "$grml_tips")) {
80 print "Error: $grml_tips not found.\nExiting.";
87 while (my $line = <$fh>) {
88 if ($line !~ /^-- $/) {
91 if ( "$tip" =~ /$pattern/m ) {
103 print "Sorry, could not find a tip for '$pattern'. :-(\n"
104 . "If you want to submit a tip please mail it to tips\@grml.org - thank "
105 . "you!\n\n" unless $tip_flag;
107 ## END OF FILE #################################################################