def append_extension(script_filename):
    """Append ".sh" or ".ps1" extension according to the OS"""
    os_target = script_filename.split("/")[-2]
    if os_target in ("Aix", "Linux", "Macos", "Vmware"):
        return f"{script_filename}.sh"
    if os_target == "Windows":
        return f"{script_filename}.ps1"
    return script_filename