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.
aoc2022/day1/input.sh

13 lines
174 B

#!/bin/bash
echo "constexpr size_t INPUT[] = {"
while IFS= read -r line; do
if [[ -z "$line" ]]; then
echo " 0,"
else
echo " ${line},"
fi
done
echo " 0,";
echo "};";