01: /*
02: * gnu/regexp/util/Egrep.java
03: * Copyright (C) 1998 Wes Biggs
04: *
05: * This program is free software; you can redistribute it and/or modify
06: * it under the terms of the GNU General Public License as published
07: * by the Free Software Foundation; either version 2 of the License, or
08: * (at your option) any later version.
09: *
10: * This program is distributed in the hope that it will be useful,
11: * but WITHOUT ANY WARRANTY; without even the implied warranty of
12: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13: * GNU General Public License for more details.
14: *
15: * You should have received a copy of the GNU General Public License
16: * along with this program; if not, write to the Free Software
17: * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18: */
19: package gnu.regexp.util;
20:
21: import gnu.regexp.RESyntax;
22:
23: /**
24: * This is a front end to the gnu.regexp.util.Grep class which sets the
25: * syntax used to RE_SYNTAX_EGREP, which aims to emulate the standard UNIX
26: * egrep command.
27: *
28: * @author <A HREF="mailto:wes@cacas.org">Wes Biggs</A>
29: * @version 1.01
30: * @use gnu.getopt
31: */
32: public class Egrep {
33: private Egrep() {
34: }
35:
36: /**
37: * Invokes Grep.grep() using the RE_SYNTAX_EGREP syntax and the
38: * command line arguments specified. Output is sent to System.out.
39: * For a list of options, use the argument "--help".
40: */
41: public static void main(String[] argv) {
42: System.exit(Grep.grep(argv, RESyntax.RE_SYNTAX_EGREP,
43: System.out));
44: }
45: }
|