Long Cat bash script
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
816 B

#!/bin/bash
# Tarkistetaan, että parametri on numero
if [[ $1 =~ ^[0-9]+$ ]]; then
echo ' /\___/\'
echo ' / \'
echo ' | # # |'
echo ' \ @ |'
echo ' \ _|_ /'
echo ' / \______'
echo ' / _______ ___ \'
echo ' |_____ \ \__/'
echo ' | \__/'
# kissan venytys parametrin mukaan
for (( i=0;i<$1;i++)); do
echo ' | |'
done
echo ' / \'
echo ' / ____ \'
echo ' | / \ |'
echo ' | | | |'
echo ' / | | \'
echo ' \__/ \__/'
echo ' '
# kissan pituuden kertominen
if [ $1 -gt 1 ]; then
echo ' Longcat.'
else
echo ' Shortcat.'
fi
else
echo 'Anna parametrina jokin numero esim: ./longcat.sh 1'
exit 1
fi
exit 0