| 1 | package driver; |
| 2 | |
| 3 | import fileIO.TextFile; |
| 4 | |
| 5 | public class Grep { |
| 6 | |
| 7 | public static void main(String[] args){ |
| 8 | |
| 9 | TextFile tf=new TextFile(args[0], true); |
| 10 | |
| 11 | String s=null; |
| 12 | |
| 13 | for(s=tf.nextLine(); s!=null; s=tf.nextLine()){ |
| 14 | if(s.contains(args[1])){System.out.println(s);} |
| 15 | } |
| 16 | tf.close(); |
| 17 | |
| 18 | } |
| 19 | |
| 20 | } |