in reply to Re: count number of lines with +
in thread count number of lines with +

thanks for the reply. the script printed all the lines with and without + at start. i just want to count the number of lines starting with a + and also i need to ignore ones dont have any other characters. ex :- + abc +bc + output should be - 2 lines.

Replies are listed 'Best First'.
Re^3: count number of lines with +
by vinoth.ree (Monsignor) on Jul 23, 2014 at 07:18 UTC

    Could you please share your sample input data, I will check with my script and let you know.


    All is well

      below is a sample. i should get the output as 2. counting lines starting by a single + and also not being the only character in the line. I know its tricky, thank you for helping me. thanks.

      +++ sdb_careers.war/body_edit_course.jsp @@ -50,7 +50,7 @@ + <option ${professionStat } + +import java.io.File; import java.sql.SQLException;

        #! /usr/bin/perl exec diffstat => @ARGV