#!/bin/bash # Get computer model MODEL=$(sysctl -n hw.model) # Get OS version OS_VERSION=$(sw_vers -productVersion) # Get frontmost app and its version FRONT_APP=$(lsappinfo info -only name `lsappinfo front | sed 's/-/-0x/'` | cut -d '"' -f 4) APP_VERSION=$(osascript -e "tell application \"$FRONT_APP\" to get version" 2>/dev/null || echo "Version unknown") # Create report REPORT="Computer Model: $MODEL macOS Version: $OS_VERSION Current Application: $FRONT_APP Application Version: $APP_VERSION" # Copy to clipboard echo "$REPORT" | pbcopy # Optional: Also print to terminal echo "$REPORT" echo -e "\nReport copied to clipboard!"