projects
/
advent-of-code-2019.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixes / changes to re-run against the google login data
[advent-of-code-2019.git]
/
day03
/
wires.sh
diff --git
a/day03/wires.sh
b/day03/wires.sh
old mode 100644
(file)
new mode 100755
(executable)
index
b94ef0b
..
2c00afd
--- a/
day03/wires.sh
+++ b/
day03/wires.sh
@@
-15,8
+15,10
@@
set -e
#wire_1=(R98 U47 R26 D63 R33 U87 L62 D20 R33 U53 R51)
#wire_2=(U98 R91 D20 R16 D67 R40 U7 R15 U6 R7)
#wire_1=(R98 U47 R26 D63 R33 U87 L62 D20 R33 U53 R51)
#wire_2=(U98 R91 D20 R16 D67 R40 U7 R15 U6 R7)
+filename=${1:-input.txt}
+
# read in data from file instead
# read in data from file instead
-exec 3<
input.txt
+exec 3<
"$filename"
IFS="," read -u 3 -a wire_1
IFS="," read -u 3 -a wire_2
IFS="," read -u 3 -a wire_1
IFS="," read -u 3 -a wire_2