]> git.sommitrealweird.co.uk Git - advent-of-code-2021.git/blobdiff - day02/sub.sh
Working day16 parser
[advent-of-code-2021.git] / day02 / sub.sh
old mode 100644 (file)
new mode 100755 (executable)
index b8040aa..2140d4e
@@ -1,6 +1,8 @@
 #!/bin/bash
 
 #!/bin/bash
 
-exec 3<input.txt
+filename="${1:-input.txt}"
+
+exec 3<"$filename"
 depth=0
 horizontal=0
 aim=0
 depth=0
 horizontal=0
 aim=0