• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

ANNOUNCEH A D27-Apr-19963.4 KiB10474

COPYINGH A D12-Feb-199617.6 KiB342281

MakefileH A D03-May-20221.9 KiB7539

READMEH A D27-Apr-19963.2 KiB9262

TODOH A D30-Apr-19966.6 KiB229201

common.cH A D25-Apr-199612.6 KiB620467

config.hH A D12-Feb-19962.4 KiB11116

defines.hH A D25-Apr-199610.4 KiB365237

eval.cH A D25-Apr-199628.3 KiB1,3541,097

main.cH A D29-Apr-199627.1 KiB1,215914

optimize.cH A D25-Apr-199611.1 KiB519414

output.cH A D29-Apr-19967.7 KiB407303

parser.cH A D25-Apr-199614.2 KiB654515

pmatch.cH A D24-Apr-19969 KiB462374

preproc.cH A D12-Feb-19964.4 KiB210167

sample.sgreprcH A D29-Apr-19966.2 KiB159142

sgrep.1H A D03-May-202223 KiB1,0941,065

sgrep.lsmH A D30-Apr-1996987 2322

sgtool.iconH A D12-Feb-19961.8 KiB2827

sgtool.tclH A D25-Apr-199661.2 KiB2,2001,596

README

1        README file for sgrep version 1.0 -
2	a tool to search a file for structured pattern
3
4        Copyright (C) 1995  University of Helsinki
5
6        This program is free software; you can redistribute it and/or modify
7        it under the terms of the GNU General Public License as published by
8        the Free Software Foundation; either version 2 of the License, or
9        (at your option) any later version.
10
11        This program is distributed in the hope that it will be useful,
12        but WITHOUT ANY WARRANTY; without even the implied warranty of
13        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14        GNU General Public License for more details.
15
16        You should have received a copy of the GNU General Public License
17        along with this program; if not, write to the Free Software
18        Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19
20        Authors: Pekka Kilpelainen       Pekka.Kilpelainen@cc.helsinki.fi
21                 Jani Jaakkola           Jani.Jaakkola@cc.helsinki
22
23---------------------------------------------------------------------------
24
25See manual page, which comes with this distribution for description and
26usage of sgrep.
27
28See announce or sgrep home page at
29	http://www.cs.helsinki.fi/~jjaakkol/sgrep.html
30to see on which systems sgrep has been tested.
31
32INSTALLATION
33------------
34
35Edit the Makefile to choose installation directories and programs.
36If you wish, you can edit config.h to choose different default behaviour.
37The defaults should be quite reasonable.
38
39Type 'make' to compile sgrep
40Type 'make install' to install sgrep binary and manualpage.
41
42MACRO FILES
43-----------
44
45Complex queries with sgrep are painful to create without a macro
46preprocessor. Since sgrep doesn't have inbuild macro preprocessor,
47external one is used. It defaults to m4, and sample macro files are in
48m4 format. Therefore you need m4 to use them. To fully utilize sgrep
49I recommend to make friends with some preprocessor ( I used to use cpp).
50
51There is an example 'sample.sgreprc' macro file, which can be installed
52with 'make install.rc'. In this file there is a macro MACRO_NAMES with which
53you can query macro names from macro libraries. Use it with command like
54
55 %sgrep -nfo "%r\n" sample.sgreprc -e MACRO_NAMES sample.sgreprc
56
57or if you have already installed the macro file
58
59 %sgrep -o "%r\n" MACRO_NAMES sample.sgreprc
60
61There is also few more macro files in the macros subdirectory.
62
63Example sgrep commands (using macros from sample.sgreprc) could be
64
65 %sgrep -o"%f:%r\n" "MACRO_NAMES" sample.sgreprc
66 %sgrep "MAIL_SUBJ or MAIL_FROM" $MAIL
67 %sgrep C_PROTOS main.c
68 %sgrep -o"%f:%r\n" HTML_TITLE ~/public_html/*.html
69
70SGTOOL
71------
72
73sgtool is a tcl/tk based X interface to sgrep. It requires tk version 4.0.
74If your wish binary is in some other directory than '/usr/local/bin' you
75have to edit the first line of sgtool.tcl to look like this
76
77#!/My-wish-binary-directory-prefix/wish
78
79instead of
80
81#!/usr/local/bin/wish
82
83There is also xbm icon for sgtool named 'sgtool.icon'
84
85MORE INFORMATION
86----------------
87
88more information, examples and newest version of sgrep will be found
89from url http://www.cs.helsinki.fi/~jjaakkol/sgrep.html
90
91That's it, good luck and enjoy!
92