bytelyst-devops-tools/wsl_test.sh
Saravanakumar D b6dc0768e3 chore(devops): finalize CLI install report and helper
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-29 21:20:52 -07:00

29 lines
550 B
Bash

#!/usr/bin/env bash
file="/mnt/d/SANDBOX/mygh/learning_ai_devops_tools/install_clis_wsl.sh"
echo "Fixing line endings"
if command -v dos2unix >/dev/null 2>&1; then
dos2unix "$file"
else
sed -i 's/\r$//' "$file"
fi
echo
echo "Running syntax check (bash -n)"
if bash -n "$file"; then
echo "bash syntax: OK"
else
echo "bash syntax: FAILED"
fi
echo
echo "First 100 lines:"
sed -n '1,100p' "$file"
echo
echo "Byte dump (first 128 bytes):"
if command -v xxd >/dev/null 2>&1; then
xxd -l 128 "$file"
else
head -c 128 "$file" | od -An -tx1
fi