8__PAGEZERO__TEXTPP__text__TEXT$00__symbol_stub1__TEXTC434__cstring__TEXTD4__DATA`P__data__DATA`P__dyld__DATA`P__la_symbol_ptr__DATA`lP__nl_symbol_ptr__DATAaXQX6__bss__DATAa`__common__DATAad8__LINKEDITp ``j h Pi8 /usr/lib/dyldÏX908($0 4/usr/lib/libgcc_s.1.dylib 4o/usr/lib/libSystem.B.dylib|: x8!T!48!z8;cW{:||+x8,@HYH|B}|}cx=;^;^;{^;Z_<;9_`;_:_;8xH/<@`dahAl!ptx= =`=@=<<<<<`8B\89)\H9k\`9J\9\8]A8!] ==> ( ( ( -u | --batch ) ) | ( -i | --ignoreCase ) | ( (-s | --regex) ( -t | --string ) ) ) ( --stdin | ( -f | --input ) ) [ ( -o | --output ) ] ==> ==> ==> ==> ==> regular_sub reads the file specified by (or stdin if --stdin is specified instead of -f) and looks for a match to . If a match is found regular_sub substitutes in place of the expression and continues the search (the substitution is global). regular_sub replaces all occurances of with that happen within a line and all occurances within all lines in a file. Options Notes: -u | --batch : process the specified file one line at a time. The specified file contains -s -t pairs. Each specified is replaced by a specified . Once the entire file is processed it is reopened and scanned again with the next -s -t pair until the batch file EOF is reached. This processing is is done in a temporary file in /tmp so the original source file is not affected. All processing by regular_sub is done as if the file was a text file. -i | --ignoreCase : ignore case in regular expression compilations -s | --regex : a regular-expression to be matched in the file specified by the -f option. -t | --string : a string substituted for the regular expression specified by the -s option. --stdin : use stdin as the input stream. If you cancel out of the input stream regular_sub will quit without output. -f | --input : a unix specified file name (absolute or relative, hard or soft link) within which the search for the regular-expression is done. -o | --output : For convienience a way to specify a file name to save the final output. Leave this option off to specify output to stdout. Output: A duplicate stream is created on stdout except that is substituted for . If no match for is found a duplication of the input stream is created. If an is specified the final output stream is written to that file if possible. If the write fails the output is written to stdout. Notes: can contain the following escaped characters: \a 0x07 \b 0x08 \f 0x0c \l 0x0a \n 0x0a (see note below) \r 0x0d \t 0x09 \v 0x0b \e 0x1b \^ thru Newline Note: *nix platforms tend to use linefeed as the new line character. Microslime's Windoze uses (0x0d 0x0a). The author really doesn't care what Microslime uses. \n will parse to linefeed. Control Character Note: The control character is generated by transforming the character immediately following the \^ to lower case, casting the unsigned byte to an integer 8-bits and finding the ordinal offset from the integer value for 'a' plus 1. This should result in the equivalent ASCII Control Character values of 01..26. Unicode values: Haven't decided how I want to do this yet. Why regular_sub: Have you tried doing a straight forward substitute? either the substitution string can't use escaped characters or you have to jump through some bizzare hoop writing boucoup script lines or worse: perl or even worse python or was that: p y t h o n OH NO IT ISN'T EVENLY SPACED SOMEWHERE! Entered destroyOptsLeaving destroyCliOptsStructEntering validOptionsTRUEFALSEvalidOptions returns %s r-s-ta+Unable to obtain buffers necessary to process output filesnot Read %d bytes; success is %sNULL Found %d matches this buffer Found a match starting at %d and ending at %d ()Found %d matches Found no matchesverbosebriefstringignoreCaseregexbatchhelpinputstdinoutputhvbs:t:u:f:o:-option %s with arg %s option -h with no argumentoption --help with no optional argument suppliedoption --help with optional argument %s option -s with value %s option -s specified without a option -b with value %s option -t with value %s option -t specified without a option -o with value %s option -o specified without an option -f with value %s option -f specified without a file name.option -u with value %s option -u specified without a option -v with value %s stdoutverbose flag is setnon-option ARGV-elements: %s Search file : %s Save to file : %s Regular Expression: %s Substitute string : %s wNO ERROR FOUNDBatch file is completedNot enough memory was available to create the temporary files needed by regular_subTemporary files could not be created (check privleges on /tmp)Invalid REGULAR EXPRESSION foundCould not create temporary output file (check privleges on /tmp)Could not create temporary input file (chaeck privleges on /tmp)No output file specified (no place to put the output)Could not get enough memory for the internal CLI options structure used by regular_subCould not get enough memory for the internal Open Files structure used by regular_subNo substitution string specifiedCould not get enough memory for the internal buffers used by regular_subFailed to remove the previous temporary input file while batchingNo batch file found while batchingregular_sub failed to clean up the file name structure (memory_leaks)regular_sub fialed to clean up the CLI options structure (memory_leaks)Unknown ErrorDDXvXbXtYiYsYuY hY(fY0-Y8oad` ```$x$x$x$x$x$x$x$x$x$x$x$x$x$x$x$x$x$x$x$x$x$x$x$x$x$x$xddfJ9.$Q$$$hNhW&a`ddbdfJ9.%0$%0$N.&L3$&L$ N .'lI$'l$N.(hc$(h$DND.(y$($$N$.($($N.)$)$ N .)$)$N.*L$*L$N.*$*$N.-$-$8N8.-$-$N./2$/$N.0L$0$\N\.0p$0$N.4$4$xNx.5 $5 $0N0.;<$;<$N.;$;$N &`&` &` dd#dPfJ9.?d$?d$LNL.?$?$N.?$?$NdddfJ9.?~$?$$N$.?$?$N.@$@$hNhdddfJ9.A Q$A$LNLd$x$.$4%0;&LQ'lk(h(())*L*--/!0E0[4t5 ;<;?d????@A#D<`M`[`na`y ad~` ```$0%-5=EU^dv dyld_stub_binding_helper__dyld_func_lookup_main_usage_destroyCliOptsStruct_cleanUpAndCloseOpenFiles_initCliOptionsStruct_initOpenFiles_validOptions_openFile_lineIsComment_createTempFile_getNextRegExAndString_validRegularExpression_translateString_swapInputFileForTempFile_showRegularExpressionCompilerError_processTempFileUsing_makeNewCliOptionsStruct_processCliArguments_writeOutputFile_doRegularSub_fileExistsForInput_fileSizeFromName_fileSizeFromFIB_isWhiteSpace_squeezeWhiteSpace_findTokenFor_showErrorRegularSub___REGULAR_SUB_VERSION___TEMPFILE_PREFIX_TEMPFILE_DIR_long_options.3480_retStatus_reg_NXArgc_NXArgv___progname__mh_execute_header_environstart___tolower_calloc_exit_fclose_fflush_fgetc_fgets_fopen_fputc_fputs$UNIX2003_free_getopt_long_memcpy_memset_optarg_optind_printf$LDBL128_putchar_puts_regcomp$UNIX2003_regerror_regexec_regfree_remove_strcpy_strlen_strncpy_strstr_tempnam$UNIX2003/Users/clarkw/Projects/RegularSub/main.c/Users/clarkw/Projects/RegularSub.build/Release/RegularSub.build/Objects-normal/ppc/main.o_main_retStatus/Users/clarkw/Projects/RegularSub/regularsub.c/Users/clarkw/Projects/RegularSub.build/Release/RegularSub.build/Objects-normal/ppc/regularsub.o_usage/Users/clarkw/Projects/RegularSub/regularsubLegalString.h_destroyCliOptsStruct_cleanUpAndCloseOpenFiles_initCliOptionsStruct_initOpenFiles_validOptions_openFile_lineIsComment_createTempFile_getNextRegExAndString_validRegularExpression_translateString/Developer/SDKs/MacOSX10.5.sdk/usr/include/ctype.h_swapInputFileForTempFile_showRegularExpressionCompilerError_processTempFileUsing_makeNewCliOptionsStruct_processCliArguments_writeOutputFile_doRegularSub___REGULAR_SUB_VERSION___TEMPFILE_PREFIX_TEMPFILE_DIR_long_options.3480_reg/Users/clarkw/Projects/RegularSub/FileInfo.c/Users/clarkw/Projects/RegularSub.build/Release/RegularSub.build/Objects-normal/ppc/FileInfo.o_fileExistsForInput_fileSizeFromName_fileSizeFromFIB/Users/clarkw/Projects/RegularSub/tokenUtilities.c/Users/clarkw/Projects/RegularSub.build/Release/RegularSub.build/Objects-normal/ppc/tokenUtilities.o_isWhiteSpace_squeezeWhiteSpace_findTokenFor/Users/clarkw/Projects/RegularSub/regularsubErrorEnums.c/Users/clarkw/Projects/RegularSub.build/Release/RegularSub.build/Objects-normal/ppc/regularsubErrorEnums.o_showErrorRegularSub