- 论坛徽章:
- 60
|
回复 9# ImpCosBoss
那个是 awk 里的 gsub函数。 你可以man awk 看下。- gsub(r, s [, t]) For each substring matching the regular expression r in the string t, substitute the string s, and return the number of substitutions. If t is not sup-
- plied, use $0. An & in the replacement text is replaced with the text that was actually matched. Use \& to get a literal &. (This must be typed as
- "\\&"; see GAWK: Effective AWK Programming for a fuller discussion of the rules for &’s and backslashes in the replacement text of sub(), gsub(), and gen-
- sub().)
复制代码 |
|