Xcode debug tip + automate(script,C,Python)

Discussion in 'Mac Programming' started by OneDreamCloser, Aug 18, 2009.

  1. OneDreamCloser macrumors member

    Jun 16, 2008
    hi all,

    i created a Xcode (2.4.1 , Tiger) project that uses a makefile to build the source code (C) :
    1. at the build log, where the warnings and errors are displayed, i cannot see the lines and files of the warnings+errors that occur ... and so it is a bit tiring to guess where the error+warning is.
    on the other hand, when i am using the terminal, that information(lines+files) of the occured warnings+errors is displayed.
    can i make Xcode to display this information ? how ?
    2. i want to automate a bit the input of my program (written in C), so i have made a script for that purpose what remains to do is :
    to search for a pattern in the text file, for example "-u 0.9"
    and to replace the above string-pattern with, for example, "-u 0.5"
    what is the easiest way of doing that ? using a unix script, a python script, C ? i would be thankful if anybody has any proposals about how i can i accomplish that.

  2. lee1210 macrumors 68040


    Jan 10, 2005
    Dallas, TX
    From the terminal:
    sed 's/-u 0.9/-u 0.5/g' currentfile.txt > currentfile2.txt

    You can use the same replacement pattern in vi over the whole file (1,$), too.

  3. OneDreamCloser thread starter macrumors member

    Jun 16, 2008
    thanx a lot Lee, that was what i was looking for !

Share This Page