home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


gensub( r , s , h [, t ])

General substitution function. Substitute s for matches of the regular expression r in the string t . If h is a number, replace the h th match. If it is "g" or "G" , substitute globally. If t is not supplied, $0 is used. Return the new string value. The original t is not modified. (Compare gsub and sub .) {G}

Previous: Reference: getline UNIX in a Nutshell: System V Edition Next: Reference: gsub
Reference: getline Book Index Reference: gsub

The UNIX CD Bookshelf NavigationThe UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System