diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2018-11-24 19:47:40 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2018-11-24 19:47:40 +0200 |
commit | ac2ff45364ab20c1a2bc82f779738f33f90808dd (patch) | |
tree | 71c475aa904d013806467e1057cb7f0f5735b38e /doc/gawktexi.in | |
parent | f1a8065d2b258eb223dc31c7700fb83266d8ddbc (diff) | |
parent | 2e1281063c92115a8da96906aab6e2be0e9dd78d (diff) | |
download | egawk-ac2ff45364ab20c1a2bc82f779738f33f90808dd.tar.gz egawk-ac2ff45364ab20c1a2bc82f779738f33f90808dd.tar.bz2 egawk-ac2ff45364ab20c1a2bc82f779738f33f90808dd.zip |
Merge branch 'gawk-4.2-stable'
Diffstat (limited to 'doc/gawktexi.in')
-rw-r--r-- | doc/gawktexi.in | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/doc/gawktexi.in b/doc/gawktexi.in index bcfec2b7..f4bf9860 100644 --- a/doc/gawktexi.in +++ b/doc/gawktexi.in @@ -11023,6 +11023,22 @@ sequences (@pxref{Escape Sequences}). @value{DARKCORNER} +Normally, variables assigned on the command line (with or without the +@option{-v} option) are treated as strings. When such variables are +used as numbers, @command{awk}'s normal automatic conversion of strings +to numbers takes place, and everything ``just works.'' + +However, @command{gawk} supports variables whose types are ``regexp''. +You can assign variables of this type using the following syntax: + +@example +gawk -v 're1=@/foo|bar/' '@dots{}' /path/to/file1 're2=@/baz|quux/' /path/to/file2 +@end example + +@noindent +Strongly typed regexps are an advanced feature (@pxref{Strong Regexp Constants}). +We mention them here only for completeness. + @node Conversion @subsection Conversion of Strings and Numbers |