Bash ping and wget
Distinguish reachability diagnostics from downloading content.
How it works
ping sends diagnostic network probes where supported, while wget retrieves resources. A host that does not answer ping may still serve HTTPS, and a successful ping does not verify a website or authorise access. Options differ between Windows ping and common Linux implementations. wget is absent in this Git Bash installation, so the listing is a clearly unexecuted Linux walkthrough.
Run the code
Reviewed with Git for Windows Bash 5.2.37. Open Git Bash, save the download with LF line endings in a separate learning folder, check it with bash -n lesson-name.sh, then run bash lesson-name.sh using the actual filename. Bash 4 or newer is required for the full course. Linux-only notes identify unavailable tools or POSIX behaviour. There is no Bash browser runner; Apache and MySQL are not required.
This Linux walkthrough was syntax-checked only: the required tool or POSIX behaviour was not available in the Windows review. Its expected section describes the intended result, not captured execution.
Example
#!/usr/bin/env bash
set -u
set -o pipefail
export LC_ALL=C
ping -c 1 127.0.0.1
# HTTPS syntax only; replace with an authorised real learning URL before use:
# wget --timeout=10 --tries=1 -O reviewed-download.txt https://downloads.example.invalid/map.txt
Expected result
On Linux, the loopback probe reports machine-specific reachability statistics. The commented wget command is an illustrative command shape, not a completed download. Linux ping behaviour and wget transfer were not executed here.
The only active destination shown is loopback. The reserved .invalid URL cannot identify a real download provider and remains commented out. A real transfer needs destination validation, certificate checking and a deliberate existing-file policy. Windows users should read their installed ping help instead of copying Linux flags blindly.
Primary technical reference: Bash documentation.