~vcs-imports/gawk/master

« back to all changes in this revision

Viewing changes to doc/gawktexi.in

  • Committer: Arnold D. Robbins
  • Date: 2018-11-24 17:47:40 UTC
  • mfrom: (731.18.14)
  • mto: This revision was merged to the branch mainline in revision 1025.
  • Revision ID: git-v1:ac2ff45364ab20c1a2bc82f779738f33f90808dd
Merge branch 'gawk-4.2-stable'

Show diffs side-by-side

added added

removed removed

Lines of Context:
11023
11023
(@pxref{Escape Sequences}).
11024
11024
@value{DARKCORNER}
11025
11025
 
 
11026
Normally, variables assigned on the command line (with or without the
 
11027
@option{-v} option) are treated as strings.  When such variables are
 
11028
used as numbers, @command{awk}'s normal automatic conversion of strings
 
11029
to numbers takes place, and everything ``just works.''
 
11030
 
 
11031
However, @command{gawk} supports variables whose types are ``regexp''.
 
11032
You can assign variables of this type using the following syntax:
 
11033
 
 
11034
@example
 
11035
gawk -v 're1=@/foo|bar/' '@dots{}' /path/to/file1 're2=@/baz|quux/' /path/to/file2
 
11036
@end example
 
11037
 
 
11038
@noindent
 
11039
Strongly typed regexps are an advanced feature (@pxref{Strong Regexp Constants}).
 
11040
We mention them here only for completeness.
 
11041
 
11026
11042
@node Conversion
11027
11043
@subsection Conversion of Strings and Numbers
11028
11044