001/* 002 * gnu/regexp/util/Egrep.java 003 * Copyright (C) 1998 Wes Biggs 004 * 005 * This program is free software; you can redistribute it and/or modify 006 * it under the terms of the GNU General Public License as published 007 * by the Free Software Foundation; either version 2 of the License, or 008 * (at your option) any later version. 009 * 010 * This program is distributed in the hope that it will be useful, 011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 013 * GNU General Public License for more details. 014 * 015 * You should have received a copy of the GNU General Public License 016 * along with this program; if not, write to the Free Software 017 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 018 */ 019package gnu.regexp.util; 020import gnu.regexp.RESyntax; 021 022/** 023 * This is a front end to the gnu.regexp.util.Grep class which sets the 024 * syntax used to RE_SYNTAX_EGREP, which aims to emulate the standard UNIX 025 * egrep command. 026 * 027 * @author <A HREF="mailto:wes@cacas.org">Wes Biggs</A> 028 * @version 1.01 029 * @use gnu.getopt 030 */ 031public class Egrep { 032 private Egrep() { } 033 034 /** 035 * Invokes Grep.grep() using the RE_SYNTAX_EGREP syntax and the 036 * command line arguments specified. Output is sent to System.out. 037 * For a list of options, use the argument "--help". 038 */ 039 public static void main(String[] argv) { 040 System.exit(Grep.grep(argv,RESyntax.RE_SYNTAX_EGREP,System.out)); 041 } 042} 043