Saya punya skrip sederhana seperti ini:
#!/bin/bash
BOO=bla-bla-bla
cat > ./Makefile <<'EOF'
Hello
INCLUDES := -I/data/opt/include/ -Ideps/ -I$BOO/include
EOF
Namun output ke file:
Hello
INCLUDES := -I/data/opt/include/ -Ideps/ -I$BOO/include
bagaimana cat
memanfaatkan nilai-nilai variabel saya, bukan nama-nama di dalam string itu?
bash
shell
cat
here-document
myWallJSON
sumber
sumber