#!/bin/bash # (c) David Vajda # 2025-09-16 # bash script excersize firstname="David" lastname="Vajda" if [[ "$1" == "$firstname" && "$2" == "$lastname" && -z "$3" ]] then echo "that's me" elif [[ "$1" == "$firstname" && -z "$2" ]] then echo "maybe that's me" else date echo "hello world!" echo "# (c) David Vajda" echo "# 2025-09-16" echo "# bash script excersize" i=0 while [ $i -lt 10 ] do echo -n "hello $i" if [ $i -eq 1 ] then echo "st" elif [ $i -eq 2 ] then echo "nd" elif [ $i -eq 3 ] then echo "rd" else echo "." fi i=$(($i+1)) done M=(A B C D) M+=(E F G H) i=0 while [ $i -lt 8 ] do echo -n "${M[$i]} " i=$(($i+1)) done for s in "${M[@]}" do echo -n "$s " done l=$(ls) i=1 for s in $l do if [ $(($i%9)) -eq 0 ] then exit fi echo "$s" i=$(($i+1)) done /bin/bash "$0" "$firstname" "$lastname" /bin/bash "$0" "$firstname" fi