/*------------------------------------------------------------------ | SR Directions ------------------------------------------------------------------*/ char *txt[24] = { "Search & Replace--Copyright 1985 WORTHY COMPUTER. ver 20 Feb 85--", " ", "sr [>outfile] -f file_spec [-s search_string [-r replace_string]", " [-verbose] ]", " ", "[...] Optional command", ">outfile Write screen output to file", "-f file_spec Files to list/search", "-s search_string String for matching in files", "-r replace_string String to replace search_string", "-verbose Displays context of matches", " ", "In search_string and replace_string you may use the substitutions:", " \\n = LF, \\r = CR, \\t = tab, \\s = space, \\b = backspace, \\f =", " formfeed, \\\\ = a single \\ . Also, because CP/M uppercases all", " command line inputs, you may use \\u to upper case all following", " chars in the string, and \\l to lowercase all following chars in", " the string. Ex: \\uw\\lorthy\\s\\uc\\lomputer = 'Worthy Computer'", " ", "Example: A>sr -f *.txt -s \\uJ\\lack -r \\uT\\lom\\s\\uJ\\lones", " Replaces 'Jack' with 'Tom Jones' in all files with extent .TXT", "" }; /*------------------------------------------------------------------ | explain() | ------------------------------------------------------------------*/ int explain() { int i; for ( i=0; strlen(txt[i]); i++ ) printf("\n%s", txt[i]); }