/open-dm-dq/standardizer/other/scripts/extractMasterClueFR.awk
AWK | 27 lines | 24 code | 3 blank | 0 comment | 0 complexity | 08889a5ea1f31da1d3ca317a8904e763 MD5 | raw file
Possible License(s): BSD-3-Clause, LGPL-2.0
- BEGIN {
- OFS = "\t"
- }
-
- {
- id = extract(1, 4)
- type = extract(71, 2)
- fullName = extract(5, 33)
- standardAbbreviation = extract(39, 13)
- shortAbbreviation = extract(53, 5)
- uspsAbbreviation = extract(59, 4)
-
- print id, \
- type, \
- fullName, \
- standardAbbreviation, \
- shortAbbreviation, \
- uspsAbbreviation
- }
-
- function extract(offset, len) {
- result = substr($0, offset, len)
- gsub(/^[ ]*/, "", result)
- gsub(/[ ]*$/, "", result)
- gsub(/\&/, "&", result)
- return result
- }