]> git.sommitrealweird.co.uk Git - advent-of-code-2021.git/blobdiff - day02/sub.sh
Day 12
[advent-of-code-2021.git] / day02 / sub.sh
index b8040aa88129a3942fdf1275e4637a7cdbd36a48..2140d4eac3668ff7b611a6e0b536e7d3b7042622 100755 (executable)
@@ -1,6 +1,8 @@
 #!/bin/bash
 
-exec 3<input.txt
+filename="${1:-input.txt}"
+
+exec 3<"$filename"
 depth=0
 horizontal=0
 aim=0