### Description

Currently, the `airflow variables export` command requires an explicit file path and does not support output to stdout. However connections can be printed to stdout using `airflow connections export -`. This inconsistency between the two export commands can lead to confusion and limits the flexibility of the variables export command.

### Use case/motivation

To bring some consistency, similar to connections, variables should also be printed to STDOUT, using `-` instead of filename. 

### Related issues

_No response_

### Are you willing to submit a PR?

- [X] Yes I am willing to submit a PR!

### Code of Conduct

- [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)

"""Test an Airflow connection."""
    console = AirflowConsole()
    if conf.get("core", "test_connection", fallback="Disabled").lower().strip() != "enabled":
        console.print(
            "[bold yellow]\nTesting connections is disabled in Airflow configuration. "
            "Contact your deployment admin to enable it.\n"
        )
        raise SystemExit(1)
    print(f"Retrieving connection: {args.conn_id!r}")
    try:
        conn = BaseHook.get_connection(args.conn_id)
    except AirflowNotFoundException:
        console.print("[bold yellow]\nConnection not found.\n")
        raise SystemExit(1)
    print("\nTesting...")
    status, message = conn.test_connection()
    if status is True:
        console.print("[bold green]\nConnection success!\n")
    else:
        console.print(f"[bold][red]\nConnection failed![/bold]\n{message}\n")