CHG: updated *nix code