File: reg4.awk

package info (click to toggle)
mawk 1.3.4.20200120-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,916 kB
  • sloc: ansic: 16,165; sh: 3,515; yacc: 1,125; awk: 722; makefile: 251
file content (33 lines) | stat: -rw-r--r-- 837 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# $MawkId: reg4.awk,v 1.9 2016/09/05 17:06:35 tom Exp $
# Test-script for MAWK
###############################################################################
# copyright 2009,2016	Thomas E. Dickey
#
# This is a source file for mawk, an implementation of
# the AWK programming language.
#
# Mawk is distributed without warranty under the terms of
# the GNU General Public License, version 2, 1991.
###############################################################################
{
	if ($0 ~/^[-+()0-9.,$%\/'"]*$/)
	{
		print ("reg4.1<<:",$0,">>")
	}
	if ($0 ~/^[]+()0-9.,$%\/'"-]*$/)
	{
		print ("reg4.2<<:",$0,">>")
	}
	if ($0 ~/^[^]+()0-9.,$%\/'"-]*$/)
	{
		print ("reg4.3<<:",$0,">>")
	}
	if ($0 ~/^[[+(){}0-9.,$%\/'"-]*$/)
	{
		print ("reg4.4<<:",$0,">>")
	}
	if ($0 ~/^[^[+(){}0-9.,$%\/'"-]*$/)
	{
		print ("reg4.5<<:",$0,">>")
	}
}