gist/irc/piraatit/piraattibotit.bash

14 lines
763 B
Bash
Raw Permalink Normal View History

2018-01-22 20:08:13 +01:00
#!/usr/bin/env bash
# Copied from https://stackoverflow.com/a/8880633 except the nicks
## declare an array variable
2023-05-18 11:41:11 +02:00
declare -a arr=("#aaltopiraatit" "#grafiikka" "#hallituskokous" "#hame" "#helsinki" "#hepihalko" "#kaakko" "#keski-suomi" "#mediaseuranta" "#pinu_hallitus" "#piraatit" "#piraattinuoret" "#piraattipuolue" "#piraattivpn" "#pirkanmaa" "#ppfi" "#sateenkaaripiraatit" "#sivusto" "#toiminta" "#tyoryhmaorganisaatiomalli" "#uusimaa" "#vaaliteltta" "#varainhankinta" "#varsinais-suomi" "#verkkopalvelut" "#mikaela")
2018-01-22 20:08:13 +01:00
## now loop through the above array
2023-05-18 11:41:11 +02:00
for i in "${arr[@]}"; do
2024-06-11 19:58:27 +02:00
echo "/msg ChanServ flags $i !piraattibotit VOP"
# or do whatever with individual element of the array
2018-01-22 20:08:13 +01:00
done
# You can access them using echo "${arr[0]}", "${arr[1]}" also