02.sh
This commit is contained in:
parent
3a7d07f766
commit
5c8c36fc99
27
04/02.sh
Executable file
27
04/02.sh
Executable file
|
@ -0,0 +1,27 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Paula fronting, so we're gonna do things a lil' differently
|
||||||
|
data="$(cat /tmp/04)"
|
||||||
|
|
||||||
|
count=0
|
||||||
|
while read line; do
|
||||||
|
IFS=, meow=($line)
|
||||||
|
IFS=- uwu=(${meow[0]})
|
||||||
|
IFS=- owo=(${meow[1]})
|
||||||
|
unset IFS
|
||||||
|
|
||||||
|
# could have been nicer but idc *shrug*
|
||||||
|
if [[ ${uwu[0]} == ${owo[0]} || ${uwu[1]} == ${owo[0]} || ${owo[1]} == ${uwu[0]} || ${owo[1]} == ${uwu[1]} ]]; then
|
||||||
|
count=$((count+1))
|
||||||
|
elif [[ ${uwu[0]} -lt ${owo[0]} && ${uwu[1]} -gt ${owo[0]} ]]; then
|
||||||
|
count=$((count+1))
|
||||||
|
elif [[ ${owo[0]} -lt ${uwu[0]} && ${owo[1]} -gt ${uwu[0]} ]]; then
|
||||||
|
count=$((count+1))
|
||||||
|
else
|
||||||
|
echo $line
|
||||||
|
fi
|
||||||
|
|
||||||
|
done <<< "$data"
|
||||||
|
|
||||||
|
echo $count
|
||||||
|
|
Loading…
Reference in a new issue