Bash Examples
Here's my code while tinkering with bash.
%%bash
#!/bin/bash
# A script that asks for your age and provides some responses based on your age.
echo "How old are you?"
read age
if [[ $age -lt 18 ]]; then
echo "stay in school lol"
elif [[ $age -ge 18 && $age -lt 30 ]]; then
echo "did you know life unofficially ends at 26?"
elif [[ $age -ge 30 && $age -lt 50 ]]; then
echo "Mid life crisis yet?"
else
echo "when life gives you lemons, wrinkle up like one"
fi
echo "By the way, you look alright for $age years old!"
This is my linux example above, I used the default age command and added some extra directions using AI. It’s now curating specific responses based on range and still echoing “you look great!”