fork download
  1. #!/usr/bin/env bash
  2.  
  3. t=$(mktemp -t -d) || exit
  4. cd "$t"
  5.  
  6. cat <<'____HERE' >Makefile
  7. SHELL := /usr/bin/env bash
  8.  
  9. .PHONY: all
  10. all:
  11. @declare -A PROVS=( ["NL"]=10 ["PE"]=11 ["NS"]=12 ["NB"]=13 ["QC"]=24 ["ON"]=35 ["MB"]=46 ["SK"]=47 ["AB"]=48 ["BC"]=59 ["YK"]=60 ["NT"]=61 ["NU"]=62 )
  12. for key in "$${!PROVS[@]}" ; do \
  13. echo "foo_$${key}_$${PROVS[$${key}]}" ; \
  14. done
  15. ls -la
  16. ____HERE
  17.  
  18. make --version
  19. make
Success #stdin #stdout 0.01s 5320KB
stdin
Standard input is empty
stdout
GNU Make 4.2.1
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://g...content-available-to-author-only...u.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
for key in "${!PROVS[@]}" ; do \
	echo "foo_${key}_${PROVS[${key}]}" ; \
done
ls -la
total 4
drwx------ 2 20046 1000  60 Jul  2 22:23 .
drwxrwx--- 3 root  1000  60 Jul  2 22:23 ..
-rw-rw-r-- 1 20046 1000 291 Jul  2 22:23 Makefile