23 lines
482 B
Bash
Executable File
23 lines
482 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Simple test of interactive input
|
|
set -euo pipefail
|
|
|
|
# Color definitions
|
|
readonly BLUE='\033[0;34m'
|
|
readonly GREEN='\033[0;32m'
|
|
readonly NC='\033[0m' # No Color
|
|
|
|
echo -e "${GREEN}🚀 Testing Interactive Input${NC}"
|
|
echo ""
|
|
|
|
echo -e -n "${BLUE}Enter your name: ${NC}"
|
|
read -r name < /dev/tty
|
|
|
|
echo -e -n "${BLUE}Enter your favorite color: ${NC}"
|
|
read -r color < /dev/tty
|
|
|
|
echo ""
|
|
echo -e "${GREEN}✅ Input received!${NC}"
|
|
echo -e "Name: $name"
|
|
echo -e "Color: $color" |