PageRenderTime 57ms CodeModel.GetById 32ms RepoModel.GetById 1ms app.codeStats 0ms

/open-dm-dq/standardizer/other/scripts/extractMasterClueFR.awk

https://bitbucket.org/pymma/mosaic
AWK | 27 lines | 24 code | 3 blank | 0 comment | 0 complexity | 08889a5ea1f31da1d3ca317a8904e763 MD5 | raw file
Possible License(s): BSD-3-Clause, LGPL-2.0
  1. BEGIN {
  2. OFS = "\t"
  3. }
  4. {
  5. id = extract(1, 4)
  6. type = extract(71, 2)
  7. fullName = extract(5, 33)
  8. standardAbbreviation = extract(39, 13)
  9. shortAbbreviation = extract(53, 5)
  10. uspsAbbreviation = extract(59, 4)
  11. print id, \
  12. type, \
  13. fullName, \
  14. standardAbbreviation, \
  15. shortAbbreviation, \
  16. uspsAbbreviation
  17. }
  18. function extract(offset, len) {
  19. result = substr($0, offset, len)
  20. gsub(/^[ ]*/, "", result)
  21. gsub(/[ ]*$/, "", result)
  22. gsub(/\&/, "&", result)
  23. return result
  24. }