KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > gnu > regexp > util > Egrep


1 /*
2  * gnu/regexp/util/Egrep.java
3  * Copyright (C) 1998 Wes Biggs
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published
7  * by the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
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 import gnu.regexp.RESyntax;
21
22 /**
23  * This is a front end to the gnu.regexp.util.Grep class which sets the
24  * syntax used to RE_SYNTAX_EGREP, which aims to emulate the standard UNIX
25  * egrep command.
26  *
27  * @author <A HREF="mailto:wes@cacas.org">Wes Biggs</A>
28  * @version 1.01
29  * @use gnu.getopt
30  */

31 public class Egrep {
32   private Egrep() { }
33
34   /**
35    * Invokes Grep.grep() using the RE_SYNTAX_EGREP syntax and the
36    * command line arguments specified. Output is sent to System.out.
37    * For a list of options, use the argument "--help".
38    */

39   public static void main(String JavaDoc[] argv) {
40     System.exit(Grep.grep(argv,RESyntax.RE_SYNTAX_EGREP,System.out));
41   }
42 }
43
44
Popular Tags