diff --git a/scripts/bin/export-env b/scripts/bin/export-env index c140c6f..123083f 100755 --- a/scripts/bin/export-env +++ b/scripts/bin/export-env @@ -1,12 +1,12 @@ #!/usr/bin/awk -f BEGIN { + print("\n") for (v in ENVIRON) { - if (v !~ /^(HOME|PWD|SHELL|USER|GROUP|UID|GID)$/) { - gsub(/[^0-9A-Za-z]/, "_", v) - gsub(/\n/, " ", ENVIRON[v]) + if (v !~ /^(PWD|HOME|PATH|SHELL|HOSTNAME|UID|USER|GID|GROUP)$/) { + gsub(/[^0-9A-Za-z_]/, "_", v); gsub(/'/, "'\\''", ENVIRON[v]) - print "export '"v"="ENVIRON[v]"'" + print("export "v"='"ENVIRON[v]"'") } } }