projects
/
advent-of-code-2021.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Day 10
[advent-of-code-2021.git]
/
day02
/
sub.sh
diff --git
a/day02/sub.sh
b/day02/sub.sh
index b8040aa88129a3942fdf1275e4637a7cdbd36a48..2140d4eac3668ff7b611a6e0b536e7d3b7042622 100755
(executable)
--- a/
day02/sub.sh
+++ b/
day02/sub.sh
@@
-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