xref: /illumos-gate/usr/src/test/util-tests/tests/awk/gnu/widesub3.awk (revision e6d6c189fa3a95d7aa27bbe0aeacf7c1a6b57c8c)
1*e6d6c189SCody Peter Mello{
2*e6d6c189SCody Peter Mello   if (substr($1,1,1) == substr($0,1,1))
3*e6d6c189SCody Peter Mello      print "substr matches"
4*e6d6c189SCody Peter Mello   sub(/foo/,"bar")
5*e6d6c189SCody Peter Mello   print nr++
6*e6d6c189SCody Peter Mello}
7