]> git.sommitrealweird.co.uk Git - advent-of-code-2019.git/blobdiff - day01/get_fuel_required.sh
Day 15
[advent-of-code-2019.git] / day01 / get_fuel_required.sh
old mode 100644 (file)
new mode 100755 (executable)
index 18e19d5..9bb4d4b
@@ -1,6 +1,8 @@
 #!/bin/bash
 
-exec 3<input.txt
+filename=${1:-input.txt}
+
+exec 3<"$filename"
 
 fuel_total=0
 fuel_and_extra=0