Spriya
2014-Nov-21 19:06 UTC
[Puppet Users] is there a way to search for a line except the other line
Hi, I have a txt file which contains */usr/lib/jvm/java-1.7.0-openjdk-1.7.0.65.x86_64/jre/bin/java -version * */usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/bin/java -version * */opt/oracle/agent12c/core/12.1.0.4.0/jdk/bin/java -version * */opt/oracle/agent12c/core/12.1.0.4.0/jdk/jre/bin/java -version * */opt/itm/v6.2.2/JRE/lx8266/bin/java -version * */u01/java/jdk1.7.0_72/jre/bin/java -version * */u01/java/jdk1.7.0_72/bin/java -version * */u01/java/jdk1.7.0_65/jre/bin/java -version* */u01/java/jdk1.7.0_65/bin/java -version * I am trying to search for lines except /u01. Is there a way i can do it. Here is how trying to write with line.include *log.each_line do |line|* * if line.include?('/java').except!('/u01') --> i am trying to read lines except the line which contains /u01* *Please anyone help me* -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/4ffbbac7-8a18-4108-8f63-0a39fd51760f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.