/* * [Without.java] * * Summary: Extracts lines in files that do not contain contain the give list of strings on the command line. * * Copyright: (c) 2009-2017 Roedy Green, Canadian Mind Products, http://mindprod.com * * Licence: This software may be copied and used freely for any purpose but military. * http://mindprod.com/contact/nonmil.html * * Requires: JDK 1.8+ * * Created with: JetBrains IntelliJ IDEA IDE http://www.jetbrains.com/idea/ * * Version History: * 1.1 2009-02-27 all switch means all strings must match */ package com.mindprod.extract; /** * Extracts lines in files that do not contain contain the give list of strings on the command line. * * @author Roedy Green, Canadian Mind Products * @version 1.1 2009-02-27 all switch means all strings must match * @since 2009-02-26 */ public final class Without extends Extract { /** * Determine if this line is wanted.. * * @param line line from the file * * @return true if this line is wanted, to be printed */ boolean isLineWanted( final String line ) { return !super.isLineWanted( line ); } /** * Extracts lines in files that do not contain contain the give list of strings on the command line * * @param args strings to search for, then a -, then names of files to process, no wildcards. * strings are case-sensitive, not regexes. * -all switch means all strings must match * -where switch means display where each line found file/line # */ public static void main( String[] args ) { try { parse( args ); new Without().processFiles(); } catch ( Exception e ) { displayError( e, "without", args ); } } // end main } // end Without