home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS - Coast to Coast
/
simteldosarchivecoasttocoast2.iso
/
awk
/
awk320.zip
/
NUMBER.AWK
< prev
next >
Wrap
Text File
|
1990-02-08
|
289b
|
13 lines
# determine whether the input is a number
# print it if it is
# AKW p40
BEGIN {
sign = "[+-]?"
decimal = "[0-9]+[.]?[0-9]*"
fraction = "[.][0-9]+"
exponent = "([eE]" sign "[0-9]+)?"
number = "^" sign "(" decimal "|" fraction ")" exponent "$"
}
$0 ~ number