SUBS.EXE Class: UNIX SUBstitute Strings NAME SUBS Substitute regular expressions in strings SYNOPSIS subs [...] DESCRIPTION Subs is a Unix utility that permits the user to rearrange any string. It uses Unix regualr expressions. A regular expression is a text string that provides for the selection and modication of very specific strings. As with most Unix utiltiies subs will accept stdin instead of a file. This permits subs to be used with strings piped from another program. OPTIONS There are no options with subs. EXAMPLES The best way to learn about subs is to try it. Since it can use stdin instead of files you can type a string in and see the changes if it matches the search string. subs test tested If you type in the word test it will be changed to tested. testing will be changed to testeding but Test will not be changed. Subs is case sensitive. Please refer to the text file on regular expressions of additional uses of subs. Grep and subs make excellent partners. Use grep to find strings and subs to alter them. lc test.c | grep ^Warning | subs "\(Warning \)\(.*\)" "\2\" This is a fairly complex use of grep and subs. In this case all output from the compiler with the word Warning at the start of the line will be picked out by grep and passed to subs. Subs will remove the first region leaving only the text that follows the warning. Great for making impromptu reports.