Search Results

Search found 2 results on 1 pages for 'subodh1989'.

Page 1/1 | 1 

  • error: strstream.h: No such file or directory

    - by subodh1989
    I am trying to run an old C++ code in Linux (Redhat). I am using gcc version 4.1.2. I got the following error: error: strstream.h: No such file or directory /trnuser1/rmtrain/DevelopmentEnv/Generic/CoreObjects/GCVTransformationServices.cpp:41: error: âostrstreamâ was not declared in this scope /trnuser1/rmtrain/DevelopmentEnv/Generic/CoreObjects/GCVTransformationServices.cpp:41: error: expected `;' before âstrDestXMLâ /trnuser1/rmtrain/DevelopmentEnv/Generic/CoreObjects/GCVTransformationServices.cpp:62: error: âstrDestXMLâ was not declared in this scope This code was running fine under Solaris with gcc version 2.95. The line pointed to by the error contains the following statement: ostrstream strDestXML; How do I solve this?

    Read the article

  • grep from a log file to get count

    - by subodh1989
    I have to get certain count from files. The grep statement i am using is like this : counter_pstn=0 completed_count_pstn=0 rec=0 for rec in `(grep "merged" update_completed*.log | awk '{print $1}' | sed 's/ //g' | cut -d':' -f2)` do if [ $counter_pstn -eq 0 ] then completed_count_pstn=$rec else completed_count_pstn=$(($completed_count_pstn+$rec)) fi counter_pstn=$(($counter_pstn+1)) done echo "Completed Orders PSTN Primary " $completed_count_pstn But the log file contains data in this format : 2500 rows merged. 2500 rows merged. 2500 rows merged. 2500 rows merged.2500 rows merged. 2500 rows merged. 2500 rows merged. As a result , it is missing out the count of one merge(eg on line 4 of output).How do i modify the grep or use another function to get the count. NOTE that the 2500 number maybe for different logs. So we have to use "rows merged" pattern to get the count. i have tried -o ,-w grep options,but it is not working. Expected output from above data: 17500 Actual output showing : 15000

    Read the article

1